mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
ci/github-script/merge: add hint about stuck GitHub (#459122)
This commit is contained in:
commit
1311ce348c
|
|
@ -191,7 +191,9 @@ async function handleMerge({
|
|||
}`,
|
||||
{ node_id: pull_request.node_id, sha: pull_request.head.sha },
|
||||
)
|
||||
return `[Queued](${resp.enqueuePullRequest.mergeQueueEntry.mergeQueue.url}) for merge`
|
||||
return [
|
||||
`:heavy_check_mark: [Queued](${resp.enqueuePullRequest.mergeQueueEntry.mergeQueue.url}) for merge (#306934)`,
|
||||
]
|
||||
} catch (e) {
|
||||
log('Enqueing failed', e.response.errors[0].message)
|
||||
}
|
||||
|
|
@ -210,7 +212,12 @@ async function handleMerge({
|
|||
}`,
|
||||
{ node_id: pull_request.node_id, sha: pull_request.head.sha },
|
||||
)
|
||||
return 'Enabled Auto Merge'
|
||||
return [
|
||||
`:heavy_check_mark: Enabled Auto Merge (#306934)`,
|
||||
'',
|
||||
'> [!TIP]',
|
||||
'> Sometimes GitHub gets stuck after enabling Auto Merge. In this case, leaving another approval should trigger the merge.',
|
||||
]
|
||||
} catch (e) {
|
||||
log('Auto Merge failed', e.response.errors[0].message)
|
||||
throw new Error(e.response.errors[0].message)
|
||||
|
|
@ -296,7 +303,7 @@ async function handleMerge({
|
|||
if (result) {
|
||||
await react('ROCKET')
|
||||
try {
|
||||
body.push(`:heavy_check_mark: ${await merge()} (#306934)`)
|
||||
body.push(...(await merge()))
|
||||
} catch (e) {
|
||||
// Remove the HTML comment with node_id reference to allow retrying this merge on the next run.
|
||||
body.shift()
|
||||
|
|
|
|||
Loading…
Reference in a new issue