Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wSimsT
Copy link

@wSimsT wSimsT commented Dec 30, 2024

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])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins changed the title Auto merge failure comment feat(automerge): merge failure comment Dec 30, 2024
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',
Copy link
Collaborator

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;
Copy link
Collaborator

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') {
Copy link
Collaborator

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants