зеркало из https://github.com/electron/sheriff.git
fix: use updated merge commit sha instead of unknown one (#71)
* fix: use updated merge commit sha instead of unknown one * chore: run prettier
This commit is contained in:
Родитель
94d950dd40
Коммит
4848e76dd8
|
@ -498,6 +498,7 @@ webhooks.on(
|
||||||
const octokit = await getOctokit(event.payload.repository.owner.login);
|
const octokit = await getOctokit(event.payload.repository.owner.login);
|
||||||
|
|
||||||
let mergeableState = event.payload.pull_request.mergeable_state;
|
let mergeableState = event.payload.pull_request.mergeable_state;
|
||||||
|
let mergeCommitSha = event.payload.pull_request.merge_commit_sha;
|
||||||
let attempt = 0;
|
let attempt = 0;
|
||||||
while ((!mergeableState || mergeableState === 'unknown') && attempt < 10) {
|
while ((!mergeableState || mergeableState === 'unknown') && attempt < 10) {
|
||||||
await new Promise((r) => setTimeout(r, 5000));
|
await new Promise((r) => setTimeout(r, 5000));
|
||||||
|
@ -509,13 +510,10 @@ webhooks.on(
|
||||||
pull_number: event.payload.pull_request.number,
|
pull_number: event.payload.pull_request.number,
|
||||||
});
|
});
|
||||||
mergeableState = pr.data.mergeable_state;
|
mergeableState = pr.data.mergeable_state;
|
||||||
|
mergeCommitSha = pr.data.merge_commit_sha;
|
||||||
}
|
}
|
||||||
|
|
||||||
await queueDryRun(
|
await queueDryRun(octokit, mergeCommitSha, event.payload.pull_request.head.sha);
|
||||||
octokit,
|
|
||||||
event.payload.pull_request.merge_commit_sha,
|
|
||||||
event.payload.pull_request.head.sha,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче