generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dependabot merge script added * automerge workflow updated * update fetch-metadata version --------- Co-authored-by: Johannes Schneider <johannes-schneider_1995@web.de>
- Loading branch information
1 parent
e64e1a8
commit 8ac2299
Showing
3 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: dependabot merger | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
review-pr: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' && | ||
github.event_name == 'pull_request' }} | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.5.1 | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
- name: comment major updates | ||
if : ${{steps.metadata.outputs.update-type == 'version-update:semver-major' }} | ||
run: | | ||
gh pr comment $PR_URL --body "PR **not approved** because it includes a major update of a dependency" | ||
gh pr edit $PR_URL --add-label "please review" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: approve and merge | ||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch' || | ||
steps.metadata.outputs.update-type == 'version-update:semver-minor'}} | ||
run: | | ||
gh pr review --approve "$PR_URL" | ||
gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |