Skip to content

Commit ee9b2db

Browse files
CI: Auto-merge Sourcery AI bot PRs
Add a GitHub Actions workflow to automatically merge pull requests from the Sourcery AI bot. New Features: - Introduce automated merging of Sourcery AI bot PRs using GitHub Actions. CI: - Set up a workflow to automatically merge pull requests opened by the `sourcery-ai[bot]` user. The workflow uses the `gh` CLI to merge the PR with the squash strategy, auto-merge, and delete the branch after merging. Resolves #6
1 parent a5f742b commit ee9b2db

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Auto-merge Sourcery AI Bot PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: write
9+
10+
env:
11+
GH_TOKEN: ${{ secrets.USER_TOKEN }}
12+
13+
jobs:
14+
merge-sourcery-pr:
15+
runs-on: ubuntu-latest
16+
if: github.event.pull_request.user.login == 'sourcery-ai[bot]'
17+
steps:
18+
- name: Merge Pull Request
19+
run: |
20+
gh pr merge "${{ github.event.pull_request.number }}" \
21+
--squash \
22+
--auto \
23+
--delete-branch \
24+
--repo "${{ github.repository }}"

0 commit comments

Comments
 (0)