-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(automerge): merge failure comment #33337
base: main
Are you sure you want to change the base?
Conversation
description: | ||
'If an error occurs while automerging, a comment will be created to signal the user. Only used if `automergeFailureComment=on-error`.', | ||
type: 'string', | ||
default: 'never', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set allowedValues
@@ -34,6 +34,7 @@ export interface RenovateSharedConfig { | |||
addLabels?: string[]; | |||
autoReplaceGlobalMatch?: boolean; | |||
automerge?: boolean; | |||
autoMergeFailureComment?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use an enum type
@@ -1694,13 +1694,21 @@ async function tryPrAutomerge( | |||
{ prNumber, errors: res.errors }, | |||
'GitHub-native automerge: fail', | |||
); | |||
if (platformPrOptions.automergeFailureComment === 'on-error') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong file for implementation. This only works for GitHub, and even then only for GitHub- active automerge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes
Changes
This PR intends to implement a PR Comment in case automerge fails, letting the users know that the automerge has failed and that they need to attend to this issue.
Context
This PR is based off of issue 31869 "Add PR comment if automerge attempt fails".
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: