Skip to content

Commit 562fd76

Browse files
authored
added up-to-date-action (polkadot-fellows#139)
Added action to keep pull requests up to date. Every time master receives a push, it will look for all the PRs and sync them with the master branch. This only works when the PR has `auto-merge` enabled (it can be enabled for all PRs too if required). Merging this PR will count as solving paritytech/auto-merge-bot#21 and paritytech/up-to-date-action#1 We use a github app to solve the issue that tests would not run if the credentials comes from a github action. I'm resuing the credentials for the [`fellowship-merge-bot`](https://github.com/apps/fellowship-merge-bot) used in [`auto-merge`](https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/auto-merge.yml). It needs to have the following permissions: - Repository permissions: - Pull Requests - [x] Write - Contents - [x] Write
1 parent 45cb7b4 commit 562fd76

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/up-to-date.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Keep PR up to date
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
updatePullRequests:
10+
runs-on: ubuntu-latest
11+
environment: master
12+
steps:
13+
- name: Generate token
14+
id: generate_token
15+
uses: tibdex/github-app-token@v1
16+
with:
17+
app_id: ${{ secrets.MERGE_APP_ID }}
18+
private_key: ${{ secrets.MERGE_APP_KEY }}
19+
- name: Update all the PRs
20+
uses: paritytech/[email protected]
21+
with:
22+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}

0 commit comments

Comments
 (0)