Skip to content

Commit d4d05e2

Browse files
committed
fixup! fix(ng-dev/pr): add timeout to wait before commenting on pr merge
1 parent c424a5c commit d4d05e2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/local-actions/branch-manager/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70128,7 +70128,7 @@ var AutosquashMergeStrategy = class extends MergeStrategy {
7012870128
this.pushTargetBranchesUpstream(targetBranches);
7012970129
const localBranch = this.getLocalTargetBranchName(githubTargetBranch);
7013070130
const sha = this.git.run(["rev-parse", localBranch]).stdout.trim();
70131-
await new Promise((resolve) => setTimeout(resolve, 5e3));
70131+
await new Promise((resolve) => setTimeout(resolve, parseInt(process.env["AUTOSQUASH_TIMEOUT"] || "0")));
7013270132
await this.git.github.issues.createComment({
7013370133
...this.git.remoteParams,
7013470134
issue_number: pullRequest.prNumber,

ng-dev/pr/merge/strategies/autosquash-merge.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ export class AutosquashMergeStrategy extends MergeStrategy {
7878
/** The SHA of the commit pushed to github which represents closing the PR. */
7979
const sha = this.git.run(['rev-parse', localBranch]).stdout.trim();
8080
// Wait five seconds to account for rate limiting of the token usage during merge.
81-
await new Promise((resolve) => setTimeout(resolve, 5000));
81+
await new Promise((resolve) =>
82+
setTimeout(resolve, parseInt(process.env['AUTOSQUASH_TIMEOUT'] || '0')),
83+
);
8284
// Github automatically closes PRs whose commits are merged into the main branch on Github.
8385
// However, it does not note them as merged using the purple merge badge as occurs when done via
8486
// the UI. To inform users that the PR was in fact merged, add a comment expressing the fact

0 commit comments

Comments
 (0)