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

docs(config options): automerge and GitHub branch protection rule #25810

Conversation

HonkingGoose
Copy link
Collaborator

Changes

  • Add warning admonition, if you use GitHub's Require status checks to pass before merging branch protection rule, then you must select at least one status check in that section

Context

Users who select the Require status checks to pass before merging checkbox expect GitHub to block Renovate PRs with any failing check. But for GitHub's feature to work properly, you must actually select at least one status check.

Examples of users confused by this behavior:

I don't know when/if GitHub will improve the form's text and layout. In the meantime we can warn our own users about this behavior.

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

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

This docs addition is unintentionally misleading.

Renovate never merges a PR with failing tests itself. The sentence implies that Renovate is a bandit which will merge your failing PR if you don't forbid it, and this is not the case.

Instead, this applies to platform automerge. If platform automerge is used, Renovate tells GitHub "please automerge this when it's ready". It is GitHub which decides "who cares about the failing tests" and merges, not Renovate

@HonkingGoose
Copy link
Collaborator Author

This docs addition is unintentionally misleading.

Yeah it's tricky to get the right wording for this. I don't want to blame GitHub (too much), and avoid users thinking Renovate is doing something wrong... 😄

If you don't GitHub allows Renovate to automerge PPs with failing tests!

I expected this wording to be about right. 🙃

Renovate never merges a PR with failing tests itself. The sentence implies that Renovate is a bandit which will merge your failing PR if you don't forbid it, and this is not the case.

🤠 Yeehaw, pardner. Allow me to automerge this here PR. I know it has breaking tests, but around these parts we like to live dangerously.

Instead, this applies to platform automerge. If platform automerge is used, Renovate tells GitHub "please automerge this when it's ready". It is GitHub which decides "who cares about the failing tests" and merges, not Renovate

I think Renovate defaults to platformAutomerge=true though, so the first thing a user is likely to do is to turn on automerge=true, without reading platformAutomerge docs.

Open for suggestions! 😄

Co-authored-by: Oliver Salzburg <oliver.salzburg@protonmail.com>
@oliversalzburg
Copy link
Contributor

How about something along the lines of:

If you configure Renovate to auto-merge, it will always instruct GitHub to auto-merge. Make sure to configure your branch protection status checks accordingly! Failing to specify status checks will allow GitHub to merge the PR with failing checks!

Co-authored-by: Rhys Arkins <rhys@arkins.net>
@rarkins rarkins added this pull request to the merge queue Nov 16, 2023
Merged via the queue into renovatebot:main with commit 6b90dd7 Nov 16, 2023
36 checks passed
@HonkingGoose HonkingGoose deleted the docs/25750-github-branch-protection-and-renovate-automerge branch November 16, 2023 07:53
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.60.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants