Change pub roller bot to push to flutter-pub-roller-bot/flutter.git (#129844)

Fixes https://github.com/flutter/flutter/issues/129744
Part of https://github.com/flutter/flutter/issues/129847

Migrate the packages_autoroller script to push to
flutter-pub-roller-bot/flutter.git, rather than
fluttergithubbot/flutter.git.
This commit is contained in:
Christopher Fujino
2023-06-30 16:28:00 -07:00
committed by GitHub
parent 1153371a56
commit 67b7aa22c2
4 changed files with 16 additions and 18 deletions

View File

@@ -15,8 +15,8 @@ import 'package:process/process.dart';
const String kTokenOption = 'token';
const String kGithubClient = 'github-client';
const String kMirrorRemote = 'mirror-remote';
const String kUpstreamRemote = 'upstream-remote';
const String kGithubAccountName = 'flutter-pub-roller-bot';
Future<void> main(List<String> args) {
return run(args);
@@ -39,11 +39,10 @@ Future<void> run(
help: 'Path to GitHub CLI client. If not provided, it is assumed `gh` is '
'present on the PATH.',
);
// TODO(fujino): delete after recipe has been migrated to stop passing this
parser.addOption(
kMirrorRemote,
help: 'The mirror git remote that the feature branch will be pushed to. '
'Required',
mandatory: true,
'mirror-remote',
help: '(Deprecated) this is now a no-op. To change the account, edit this tool.',
);
parser.addOption(
kUpstreamRemote,
@@ -64,7 +63,7 @@ ${parser.usage}
rethrow;
}
final String mirrorUrl = results[kMirrorRemote]! as String;
const String mirrorUrl = 'https://github.com/flutter-pub-roller-bot/flutter.git';
final String upstreamUrl = results[kUpstreamRemote]! as String;
final String tokenPath = results[kTokenOption]! as String;
final File tokenFile = fs.file(tokenPath);
@@ -92,6 +91,7 @@ ${parser.usage}
orgName: _parseOrgName(mirrorUrl),
token: token,
processManager: processManager,
githubUsername: kGithubAccountName,
).roll();
}