Add comment to PRs if automerge attempt fails #31604
Replies: 2 comments
-
Proposal: the platform
If unsuccessful, the worker layer will then check for the value of a new configuration option If the failure reason changes, the existing comment should be updated in-place (we don't want multiple failure comments in a PR). We should not check for the presence of this comment every run (i.e. to check just in case there's one to remove) because that will consume API calls, but we should remove any such comment after any force push, assuming we didn't retry automerging immediately (which is our usual behavior). |
Beta Was this translation helpful? Give feedback.
-
Converted to issue: #31869 |
Beta Was this translation helpful? Give feedback.
-
Tell us more.
We should add a feature to comment on PRs when automerge is failing so that it's clear to developers in the repo without needing to check logs.
There are times when automerge is failing, and won't work without user intervention of some sort. Today the end users get very little visibility into this (other than that PRs will remain open unless manually merged).
There are two main scenarios:
The second one is typically due to permissions problems or there being some type of branch protection rule which isn't met (such as approvals).
The first is much harder to decide when to comment, for example if Renovate does not automerge a PR 2 minutes after it was created, because tests are still running, then it would usually be an annoyance to comment as such to the user.
We could make this opt-in, at least until we're sure of the reliability, accuracy, and usefulness of the feature, and potentially need to make it configurable (i.e. enum values, not boolean). I think we could start with the failure case (Renovate tries to automerge, is rejected) and then defer the other case (Renovate does not try to automerge) for later.
Beta Was this translation helpful? Give feedback.
All reactions