-
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
Changes from all commits
4215ab4
b92e15f
ca8bd10
679a0a8
e03b411
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Use an enum type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
like this |
||||||
automergeSchedule?: string[]; | ||||||
automergeStrategy?: MergeStrategy; | ||||||
branchName?: string; | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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. |
||
logger.warn('This automerge request failed'); | ||
await addComment( | ||
prNumber, | ||
'The Automerge Request for this PR has failed. Please attend.', | ||
); | ||
return; | ||
} | ||
return; | ||
} | ||
|
||
logger.debug(`GitHub-native automerge: success...PrNo: ${prNumber}`); | ||
} catch (err) /* istanbul ignore next: missing test #22198 */ { | ||
logger.warn({ prNumber, err }, 'GitHub-native automerge: REST API error'); | ||
} | ||
return; | ||
} | ||
|
||
// Creates PR and returns PR number | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated changes |
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