1313 workflow_call :
1414
1515jobs :
16+ bot_approval :
17+ name : Bot Approval
18+ if : |
19+ github.event_name == 'pull_request_target' &&
20+ (github.event.action == 'opened' || github.event.action == 'reopened') &&
21+ (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot')
22+ runs-on : ubuntu-latest
23+ permissions :
24+ pull-requests : write
25+
26+ steps :
27+ - uses : hmarr/auto-approve-action@v3
28+ with :
29+ github-token : ${{ secrets.GITHUB_TOKEN }}
30+ review-message : " 🤖 auto approved a ${{ github.event.pull_request.user.login }} PR."
31+
32+ - uses : hmarr/auto-approve-action@v3
33+ with :
34+ github-token : ${{ secrets.PROJECT_MU_BOT_TOKEN }}
35+ review-message : " 🤖 auto approved a ${{ github.event.pull_request.user.login }} PR."
36+
1637 auto_merge :
1738 name : Merge
1839 runs-on : ubuntu-latest
@@ -28,13 +49,14 @@ jobs:
2849 id : auto_merge
2950 uses : pascalgn/automerge-action@v0.15.5
3051 env :
31- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
52+ GITHUB_TOKEN : " ${{ secrets.PROJECT_MU_BOT_TOKEN }}"
53+ MERGE_ERROR_FAIL : " false" # Do not fail if an auto merge couldn't happen
3254 MERGE_FILTER_AUTHOR : " ${{ matrix.author }}"
3355 MERGE_FORKS : " false" # dependabot and uefibot come from local repo branches - forks not needed
3456 MERGE_LABELS : " !state:duplicate,!state:invalid,!state:needs-maintainer-feedback,!state:needs-submitter-info,!state:under-discussion,!state:wont-fix,!type:notes,!type:question"
3557 MERGE_METHOD : " squash" # Default merge method squash (instead of "merge")
3658 MERGE_REMOVE_LABELS : = "" # Do not remove any labels from a PR after merge
37- MERGE_REQUIRED_APPROVALS : " 0 " # Auto merge these PRs without human reviewers involved (need to pass PR gates)
59+ MERGE_REQUIRED_APPROVALS : " 2 " # Two PRs can be humans or bots (need to pass PR gates)
3860 MERGE_RETRIES : " 6" # Check if PR status checks pass up to 6 times
3961 MERGE_RETRY_SLEEP : " 10000" # Check if PR status checks are met every 10 secs (6 * 10 = check over 1 min)
4062 UPDATE_LABELS : " " # Always update these PRs if needed to merge
0 commit comments