Skip to content

Commit 026d3a2

Browse files
committed
auto-approve backport PRs
1 parent 202297b commit 026d3a2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/on_push.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,24 @@ jobs:
8383
8484
exit $exit
8585
86+
- name: Checkout
87+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88+
89+
- name: Get PR branch
90+
id: branch
91+
if: inputs.pr_number || github.event.pull_request.number
92+
env:
93+
GH_TOKEN: ${{ github.token }}
94+
run: |
95+
echo "branch=$(gh pr view ${{ inputs.pr_number || github.event.pull_request.number }} --json headRefName -q .headRefName)" | tee -a $GITHUB_OUTPUT
96+
97+
- name: Approve backport PRs
98+
if: startsWith((steps.branch.outputs.branch), 'release-')
99+
env:
100+
GH_TOKEN: ${{ github.token }}
101+
run: |
102+
gh pr review ${{ inputs.pr_number || github.event.pull_request.number }} --approve -b "All checks passed"
103+
86104
finish-comment:
87105
name: Post Finish Comment 💬
88106
if: ${{ inputs.post_result }}

0 commit comments

Comments
 (0)