Skip to content

Commit

Permalink
Auto-approve and auto-merge renovate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Mar 4, 2025
1 parent c718419 commit e52fd6a
Showing 2 changed files with 48 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto-Approve

on:
pull_request_target:
types: [opened, labeled]

jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: github.actor == 'dependabot[bot]' || contains(github.event.pull_request.labels.*.name, 'ship!')
steps:
- name: Approve
run: gh pr review "${{ github.event.pull_request.number }}" --approve --body "Ship it!"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository_owner }}/${{ github.event.repository.name }}

- name: Enable auto-merge
if: contains(github.event.pull_request.labels.*.name, 'ship!')
run: gh pr merge "${{ github.event.pull_request.number }}" --auto --squash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository_owner }}/${{ github.event.repository.name }}
23 changes: 22 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -20,7 +20,8 @@
"https://repo.maven.apache.org/maven2"
],
"fetchChangeLogs": "off",
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:(?:-.+)?-eap-(?<build>\\d+))?$"
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:(?:-.+)?-eap-(?<build>\\d+))?$",
"automerge": true
},
{
"description": "False positive dependency findings.",
@@ -57,6 +58,26 @@
"com.gradle:develocity-gradle-plugin*"
],
"enabled": false
},
{
"description": "Automerge patch releases",
"matchUpdateTypes": ["patch"],
"automerge": true
},
{
"description": "Automerge test and infrastructure dependencies",
"matchDepNames": [
"ch.qos.logback:logback-classic",
"com.gradle:common-custom-user-data-gradle-plugin",
"com.osacky.doctor:doctor-plugin",
"gradle",
"io.mockk:mockk",
"org.jetbrains.kotlinx.kover",
"org.jetbrains.kotlinx:binary-compatibility-validator",
"org.jmailen.gradle:kotlinter-gradle",
"org.junit.jupiter:junit-jupiter"
],
"automerge": true
}
]
}

0 comments on commit e52fd6a

Please sign in to comment.