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

Merged
merged 13 commits into from
Feb 4, 2025
12 changes: 12 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
"integration/testdata/**",
"test/resources/**"
],
"labels": [
"dependencies"
],
"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).

"matchCurrentVersion": "!/^0/",
"automerge": true,
"rollbackPrs": true
}
],
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths"
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/renovate-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Renovatebot - Trigger integration tests on PR update

on:
pull_request:
# Assuming Renovate creates branches with a specific prefix
branches:
- 'renovate/**'

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Post a comment
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue_number = context.payload.pull_request.number;
const comment = "/it-go";
github.issues.createComment({
...context.repo,
issue_number,
body: comment
});
Loading