File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 PR_URL : ${{ github.event.pull_request.html_url }}
3131 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3232
33+ - name : Update PR branch
34+ run : |
35+ # Update the PR branch with the latest from base branch
36+ gh pr update-branch "$PR_URL" || echo "Branch already up to date or cannot be updated"
37+ env :
38+ PR_URL : ${{ github.event.pull_request.html_url }}
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+
3341 - name : Enable auto-merge for Dependabot PRs
3442 run : gh pr merge --auto --squash "$PR_URL"
3543 env :
8290 console.log(`PR #${prNumber} is from Dependabot: ${isDependabot}`);
8391 return isDependabot;
8492
93+ - name : Update PR branch
94+ if : steps.check-dependabot.outputs.result == 'true'
95+ env :
96+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97+ run : |
98+ PR_NUMBER=${{ steps.pr.outputs.result }}
99+ # Update the PR branch with the latest from base branch
100+ gh pr update-branch $PR_NUMBER --repo ${{ github.repository }} || echo "Branch already up to date or cannot be updated"
101+
85102 - name : Merge PR
86103 if : steps.check-dependabot.outputs.result == 'true'
87104 env :
Original file line number Diff line number Diff line change 3131 wait-interval : 30
3232 allowed-conclusions : success,skipped,neutral
3333
34+ - name : Update PR branch
35+ if : |
36+ steps.wait-for-checks.outcome == 'success' &&
37+ (steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
38+ steps.metadata.outputs.update-type == 'version-update:semver-minor')
39+ run : |
40+ # Update the PR branch with the latest from base branch
41+ gh pr update-branch "$PR_URL" || echo "Branch already up to date or cannot be updated"
42+ env :
43+ PR_URL : ${{ github.event.pull_request.html_url }}
44+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+
3446 - name : Enable auto-merge for Dependabot PRs
3547 if : |
3648 steps.wait-for-checks.outcome == 'success' &&
You can’t perform that action at this time.
0 commit comments