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

Add PR comment if automerge attempt fails #31869

Open
rarkins opened this issue Oct 9, 2024 · 0 comments
Open

Add PR comment if automerge attempt fails #31869

rarkins opened this issue Oct 9, 2024 · 0 comments
Labels
core:automerge Relating to Renovate's automerge capabilities priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Oct 9, 2024

Describe the proposed change(s).

If Renovate attempts a PR automerge, and the attempt fails (e.g. is rejected by the platform), then Renovate should add a PR comment with information about the failure. This comment should remain in place indefinitely, either as-is or potentially being updated if the failure reason changes.

Implementation suggestion:

  1. Add a new enum configuration option automergeFailureComment, which defaults to "never", and also accepts "on-error".
  2. Update the tryPrAutomerge() function to return a result, either:
    • Successful
    • Unsuccessful with a description (which may include logs)
  3. If unsuccessful, the worker layer will then check for the value of automergeFailureComment. If set to "never", no comment is added (same as today's functionality). If it's set to "on-error" then the worker should ensure a PR comment with title "Automerge failure notification" and include the failure description passed back from the platform.
@rarkins rarkins added type:feature Feature (new functionality) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others core:automerge Relating to Renovate's automerge capabilities labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:automerge Relating to Renovate's automerge capabilities priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant