Skip to content

Commit e49eb4c

Browse files
authored
Merge main into auto-merge
2 parents 128a311 + 7987401 commit e49eb4c

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/auto-label.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Automatically mark PRs to sync"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
8+
jobs:
9+
labeler:
10+
if: github.event.pull_request.user.type != 'Bot'
11+
permissions:
12+
pull-requests: write
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Add "sync" label to PR
17+
run: gh pr edit "$PR_URL" --add-label sync --repo "$PR_REPO"
18+
env:
19+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
PR_URL: ${{ github.event.pull_request.html_url }}
21+
PR_REPO: ${{ github.repository }}
22+
23+
- name: Comment on PR to explain sync label
24+
run: gh pr comment "$PR_URL" --body "This pull request has been marked to **automatically sync** to its base branch. You can **disable** this behavior by removing the `sync` label." --repo "$PR_REPO"
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
PR_URL: ${{ github.event.pull_request.html_url }}
28+
PR_REPO: ${{ github.repository }}

.github/workflows/autoupdate.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: pr-auto-update
2+
on:
3+
push: {}
4+
5+
jobs:
6+
pr-auto-update:
7+
name: Automatic PR Updater
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
contents: write
12+
steps:
13+
- uses: CSSUoB/pr-auto-updater@v2.2.2
14+
env:
15+
GITHUB_TOKEN: '${{ secrets.PR_AUTO_UPDATE_TOKEN }}'
16+
PR_FILTER: 'labelled'
17+
PR_LABELS: 'sync'
18+
MERGE_CONFLICT_ACTION: 'label'
19+
MERGE_CONFLICT_LABEL: 'conflict'

0 commit comments

Comments
 (0)