-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from Bullrich/auto-merge-bot
added auto-merge and up-to-date GitHub actions
- Loading branch information
Showing
2 changed files
with
53 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,30 @@ | ||
name: Auto Merge Bot | ||
|
||
on: | ||
# GitHub considers PRs as issues | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
set-auto-merge: | ||
runs-on: ubuntu-latest | ||
environment: master | ||
timeout-minutes: 10 | ||
# Important! This forces the job to run only on comments on Pull Requests that starts with '/merge' | ||
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/merge') }} | ||
steps: | ||
- name: Get the GitHub handle of the fellows | ||
uses: paritytech/[email protected] | ||
id: fellows | ||
- name: Generate a token | ||
id: merge_token | ||
uses: actions/[email protected] | ||
with: | ||
app-id: ${{ secrets.MERGE_APP_ID }} | ||
private-key: ${{ secrets.MERGE_APP_KEY }} | ||
- name: Set auto merge | ||
uses: paritytech/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }} | ||
MERGE_METHOD: "SQUASH" | ||
ALLOWLIST: ${{ steps.fellows.outputs.github-handles }} |
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: Keep PR up to date | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
updatePullRequests: | ||
name: Keep PRs up to date | ||
runs-on: ubuntu-latest | ||
environment: master | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.MERGE_APP_ID }} | ||
private-key: ${{ secrets.MERGE_APP_KEY }} | ||
- name: Update all the PRs | ||
uses: paritytech/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} |