Skip to content

Commit 94995f5

Browse files
committed
chore(ci): auto-merge release pull requests
1 parent 7895688 commit 94995f5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release Auto-merge
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1'
6+
workflow_dispatch:
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
auto-merge:
14+
name: Enable auto-merge on release PRs
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Enable auto-merge on localstack-bot PRs
18+
env:
19+
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
20+
GH_REPO: ${{ github.repository }}
21+
run: |
22+
gh pr list \
23+
--author "localstack-bot[bot]" \
24+
--state open \
25+
--json number \
26+
--jq '.[].number' | \
27+
while read -r pr; do
28+
echo "Enabling auto-merge on PR #$pr"
29+
gh pr merge "$pr" --auto --squash
30+
done

0 commit comments

Comments
 (0)