-
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
f8e8768
commit 0375c9d
Showing
3 changed files
with
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Auto Author Assign | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, reopened ] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/[email protected] |
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,28 @@ | ||
name: Dependent Issues | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
- edited | ||
- closed | ||
- reopened | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- closed | ||
- reopened | ||
# Makes sure we always add status check for PRs. Useful only if | ||
# this action is required to pass before merging. Otherwise, it | ||
# can be removed. | ||
- synchronize | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: z0al/dependent-issues@v1 | ||
env: | ||
# (Required) The token to use to make API calls to GitHub. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,59 @@ | ||
# GitHub Actions Virtual Environments | ||
# https://github.com/actions/virtual-environments/ | ||
|
||
# Rebases a pull request on the repo's default branch when the "rebase" label is added | ||
# Note: you'll need to add a personal access token to your repo, `PERSONAL_ACCESS_TOKEN`. (`REBASE_PR_TOKEN`) | ||
# Link: https://github.com/jessesquires/gh-workflows/blob/main/.github/workflows/rebase-default-branch.yml | ||
|
||
name: Rebase Pull Request | ||
|
||
on: | ||
pull_request: | ||
types: [ labeled ] | ||
|
||
env: | ||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
|
||
jobs: | ||
main: | ||
if: ${{ contains(github.event.*.labels.*.name, 'rebase') }} | ||
name: Rebase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.REBASE_PR_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 0 | ||
|
||
# Link: https://httgp.com/signing-commits-in-github-actions/ | ||
- name: Import bot's GPG key for signing commits | ||
id: import-gpg | ||
uses: crazy-max/ghaction-import-gpg@v4 | ||
with: | ||
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }} | ||
git_config_global: true | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: perform rebase | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git status | ||
git pull | ||
git checkout "$DEFAULT_BRANCH" | ||
git status | ||
git pull | ||
git checkout "$GITHUB_HEAD_REF" | ||
git rebase "$DEFAULT_BRANCH" | ||
git push --force-with-lease | ||
git status | ||
# Link: https://github.com/marketplace/actions/actions-ecosystem-remove-labels | ||
- name: remove label | ||
if: always() | ||
uses: actions-ecosystem/action-remove-labels@v1 | ||
with: | ||
labels: rebase |