-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1926cf1
commit 9541c51
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: "Auto Merge Dependabot PRs" | ||
"on": | ||
pull_request: | ||
types: | ||
- "labeled" | ||
- "opened" | ||
- "synchronize" | ||
jobs: | ||
auto-merge: | ||
if: "${{ github.actor == 'dependabot[bot]' }} || ${{ github.actor == 'BenSlabbert'\ | ||
\ }}" | ||
runs-on: "ubuntu-latest" | ||
env: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v4" | ||
- name: "Auto-merge Dependabot PRs" | ||
run: "PR_LABEL=$(gh pr view ${{ github.event.pull_request.number }} --json labels\ | ||
\ --jq '.labels[].name' | grep -i 'automerge')\nif [ \"$PR_LABEL\" == \"automerge\"\ | ||
\ ]; then\n gh pr merge ${{ github.event.pull_request.number }} --rebase\ | ||
\ --auto\nfi\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "Rebase PRs on Main Merge" | ||
"on": | ||
push: | ||
branches: | ||
- "main" | ||
jobs: | ||
rebase: | ||
runs-on: "ubuntu-latest" | ||
env: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v2" | ||
- name: "List open pull requests" | ||
id: "list-prs" | ||
run: "gh pr list --state open --json number -q '.[] | [.number] | @tsv' > prs.tsv\n" | ||
- name: "Rebase each pull request" | ||
run: "while IFS=$'\\t' read -r number\ndo\n echo \"Rebasing PR #$number\"\n\ | ||
\ gh pr update-branch $number --rebase\ndone < prs.tsv\n" |