refactor(dev-infra): remove unused argument from `publish` script (#41688)
Since recently, the `githubToken` parameter passed to the `ReleaseTool` constructor is no longer used. This commit removes the unused parameter and also the corresponding argument from the `publish` script. PR Close #41688
This commit is contained in:
parent
8058396c52
commit
7c353d452e
|
@ -6619,10 +6619,9 @@ var CompletionState;
|
|||
CompletionState[CompletionState["MANUALLY_ABORTED"] = 2] = "MANUALLY_ABORTED";
|
||||
})(CompletionState || (CompletionState = {}));
|
||||
class ReleaseTool {
|
||||
constructor(_config, _github, _githubToken, _projectRoot) {
|
||||
constructor(_config, _github, _projectRoot) {
|
||||
this._config = _config;
|
||||
this._github = _github;
|
||||
this._githubToken = _githubToken;
|
||||
this._projectRoot = _projectRoot;
|
||||
/** The singleton instance of the GitClient. */
|
||||
this._git = GitClient.getAuthenticatedInstance();
|
||||
|
@ -6782,13 +6781,13 @@ function builder$8(argv) {
|
|||
return addGithubTokenOption(argv);
|
||||
}
|
||||
/** Yargs command handler for staging a release. */
|
||||
function handler$8(args) {
|
||||
function handler$8() {
|
||||
return tslib.__awaiter(this, void 0, void 0, function* () {
|
||||
const git = GitClient.getInstance();
|
||||
const config = getConfig();
|
||||
const releaseConfig = getReleaseConfig(config);
|
||||
const projectDir = git.baseDir;
|
||||
const task = new ReleaseTool(releaseConfig, config.github, args.githubToken, projectDir);
|
||||
const task = new ReleaseTool(releaseConfig, config.github, projectDir);
|
||||
const result = yield task.run();
|
||||
switch (result) {
|
||||
case CompletionState.FATAL_ERROR:
|
||||
|
|
|
@ -27,12 +27,12 @@ function builder(argv: Argv): Argv<ReleasePublishOptions> {
|
|||
}
|
||||
|
||||
/** Yargs command handler for staging a release. */
|
||||
async function handler(args: Arguments<ReleasePublishOptions>) {
|
||||
async function handler() {
|
||||
const git = GitClient.getInstance();
|
||||
const config = getConfig();
|
||||
const releaseConfig = getReleaseConfig(config);
|
||||
const projectDir = git.baseDir;
|
||||
const task = new ReleaseTool(releaseConfig, config.github, args.githubToken, projectDir);
|
||||
const task = new ReleaseTool(releaseConfig, config.github, projectDir);
|
||||
const result = await task.run();
|
||||
|
||||
switch (result) {
|
||||
|
|
|
@ -35,7 +35,7 @@ export class ReleaseTool {
|
|||
|
||||
constructor(
|
||||
protected _config: ReleaseConfig, protected _github: GithubConfig,
|
||||
protected _githubToken: string, protected _projectRoot: string) {}
|
||||
protected _projectRoot: string) {}
|
||||
|
||||
/** Runs the interactive release tool. */
|
||||
async run(): Promise<CompletionState> {
|
||||
|
|
Loading…
Reference in New Issue