-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fet(pdf-remo): dependent bot auto merge yml
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Auto-merge Dependabot PRs | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' # Trigger only for Dependabot PRs | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Dependabot compatibility score | ||
run: | | ||
pr_url="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | ||
compatibility_score=$(curl -s "$pr_url" | jq -r '.head.repo.compatibility_score') | ||
echo "Compatibility score is $compatibility_score" | ||
- name: Check compatibility score and auto-merge | ||
run: | | ||
if [[ $compatibility_score == "100" ]]; then | ||
echo "Compatibility score is 100%, auto-merging..." | ||
gh pr merge ${{ github.event.pull_request.number }} --auto --squash --delete-branch | ||
else | ||
echo "Compatibility score is not 100%, skipping auto-merge." | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -23,3 +23,4 @@ updates: | |
- dependency-name: "@angular*" | ||
update-types: | ||
- "version-update:semver-major" | ||
|