-
-
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.
Merge pull request #26 from josh-wong/add-auto-pr-workflows
Issue fix: Add workflows that auto-create PRs
- Loading branch information
Showing
3 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
.github/workflows/auto-create-pr-bitcoin-cash-node-on-raspberry-pi.yml
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,40 @@ | ||
# This workflow auto-creates PRs for docs that have been updated in my "bitcoin-cash-node-on-raspberry-pi" repository. | ||
name: ✨ Auto-create PR - bitcoin-cash-node-on-raspberry-pi docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- bitcoin-cash-node-on-raspberry-pi/** | ||
- passgen/** | ||
- zune-software-setup/** | ||
|
||
jobs: | ||
create-pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create pull request | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const result = await github.rest.pulls.create({ | ||
title: 'AUTO: Docs sync - `bitcoin-cash-node-on-raspberry-pi`', | ||
owner, | ||
repo, | ||
head: '${{ github.ref_name }}', | ||
base: 'main', | ||
body: [ | ||
'This is an automated pull request (PR) to sync changes to docs in the [josh-wong/bitcoin-cash-node-on-raspberry-pi](https://github.com/josh-wong/bitcoin-cash-node-on-raspberry-pi) repo to this repo.', | ||
'', | ||
'Before merging this PR, confirm the following:', | ||
'', | ||
'- [ ] I have updated the side navigation to include new docs or remove deleted docs (if necessary).', | ||
'- [ ] I have confirmed that this PR can be merged without waiting (if necessary).' | ||
].join('\n') | ||
}); | ||
github.rest.issues.addLabels({ | ||
owner, | ||
repo, | ||
issue_number: result.data.number, | ||
labels: ['documentation', 'triage'] | ||
}); |
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,38 @@ | ||
# This workflow auto-creates PRs for docs that have been updated in my "passgen" repository. | ||
name: ✨ Auto-create PR - passgen docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- passgen/** | ||
|
||
jobs: | ||
create-pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create pull request | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const result = await github.rest.pulls.create({ | ||
title: 'AUTO: Docs sync - `passgen`', | ||
owner, | ||
repo, | ||
head: '${{ github.ref_name }}', | ||
base: 'main', | ||
body: [ | ||
'This is an automated pull request (PR) to sync changes to docs in the [josh-wong/passgen](https://github.com/josh-wong/passgen) repo to this repo.', | ||
'', | ||
'Before merging this PR, confirm the following:', | ||
'', | ||
'- [ ] I have updated the side navigation to include new docs or remove deleted docs (if necessary).', | ||
'- [ ] I have confirmed that this PR can be merged without waiting (if necessary).' | ||
].join('\n') | ||
}); | ||
github.rest.issues.addLabels({ | ||
owner, | ||
repo, | ||
issue_number: result.data.number, | ||
labels: ['documentation', 'triage'] | ||
}); |
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,38 @@ | ||
# This workflow auto-creates PRs for docs that have been updated in my "zune-software-setup" repository. | ||
name: ✨ Auto-create PR - zune-software-setup docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- zune-software-setup/** | ||
|
||
jobs: | ||
create-pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create pull request | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const result = await github.rest.pulls.create({ | ||
title: 'AUTO: Docs sync - `zune-software-setup`', | ||
owner, | ||
repo, | ||
head: '${{ github.ref_name }}', | ||
base: 'main', | ||
body: [ | ||
'This is an automated pull request (PR) to sync changes to docs in the [josh-wong/zune-software-setup](https://github.com/josh-wong/zune-software-setup) repo to this repo.', | ||
'', | ||
'Before merging this PR, confirm the following:', | ||
'', | ||
'- [ ] I have updated the side navigation to include new docs or remove deleted docs (if necessary).', | ||
'- [ ] I have confirmed that this PR can be merged without waiting (if necessary).' | ||
].join('\n') | ||
}); | ||
github.rest.issues.addLabels({ | ||
owner, | ||
repo, | ||
issue_number: result.data.number, | ||
labels: ['documentation', 'triage'] | ||
}); |