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(renovate): automerge PRs for patch updates #5252

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

niki4
Copy link
Member

@niki4 niki4 commented Jan 28, 2025

Description

This PR including:

  • Added configuration for renovatebot to auto merge its PRs for patch version update of Go dependency modules.

Before the change we had 🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied. in the PR description generated by renovatebot. After the change it should be 🚦 Automerge: Enabled

  • Added Github Action workflow that triggers the "Go / integration-tests" workflow (which is a mandatory check) on each renovatebot PR update.

  • Enabled rollbackPrs - In case if author of the dependency will remove/revoke the latest version, a PR to downgrade the package will be created.

Notes:

  • Both automerge and rollbackPrs features enabled on Golang modules updates only.
  • renovatebot will still create update PRs for the other types of dependency updates (e.g., actions, java dependencies, etc.), but they will not be automerged and therefore to be reviewed and merged manually.
  • Updates of versions 0.x considered as potentially containing breaking changes (not stable) and not auto merged, those PRs to be reviewed and merged manually.

Set up

To make the auto merge feature work, further configuration required:

  1. Install to the project repo renovate-approve bot which will mark as reviewed automerge-enabled PRs made by renovatebot, in case all the mandatory PR checks are green.

References:

Checklist

  • Tests
  • Documentation
  • Inner source library needs updating

@niki4 niki4 requested a review from a team as a code owner January 28, 2025 12:34
@niki4
Copy link
Member Author

niki4 commented Jan 28, 2025

/it-go

@D074360
Copy link
Member

D074360 commented Jan 28, 2025

@niki4 Did you able to test the changes in a fork or some other repo?

"packageRules": [
{
"description": "Automerge non-major updates (versions >1.0.0)",
"matchUpdateTypes": ["minor", "patch"],
Copy link
Member

Choose a reason for hiding this comment

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

I don't think updating minor versions is a good idea, as some open source projects don't follow semantic versioning. We can discuss in the daily tomorrow.

Copy link
Member Author

Choose a reason for hiding this comment

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

matchUpdateTypes set to "patch" only (so, the automerge allowed for cases like "1.1.1 -> 1.1.2", but not minor "1.1.1->1.2.1" and not major "1.1.1->2.1.1" version upgrades).

@niki4 niki4 changed the title feat(renovate): automerge PRs for non-major updates feat(renovate): automerge PRs for patch updates Jan 30, 2025
@niki4
Copy link
Member Author

niki4 commented Jan 30, 2025

/it-go

@niki4
Copy link
Member Author

niki4 commented Jan 30, 2025

@niki4 Did you able to test the changes in a fork or some other repo?

I tested it on my fork of the jenkins-library.

Here is the example of the automerged Go module update PR, it has been fully automated created, verified, approved and merged. niki4#40

@niki4 niki4 requested a review from a team January 31, 2025 08:31
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