-
Notifications
You must be signed in to change notification settings - Fork 4
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
199f15a
commit 6b6dad2
Showing
2 changed files
with
25 additions
and
4 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
on: [pull_request] | ||
|
||
jobs: | ||
hello_world_job: | ||
copy-labels: | ||
runs-on: ubuntu-latest | ||
name: Copy labels from linked issues | ||
steps: | ||
- name: copy-labels | ||
uses: michalvankodev/copy-issue-labels@v0.2.12 | ||
uses: michalvankodev/copy-issue-labels@v1 | ||
with: | ||
repo-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 |
---|---|---|
|
@@ -9,7 +9,28 @@ This workflow will copy labels from the linked issue for the opened PR. | |
Github issues can link other issues and this linkin is done automatically whenever PR mentions one of the keywords for automated workflows. [See documentation](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) | ||
|
||
```yml | ||
|
||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
copy-labels: | ||
runs-on: ubuntu-latest | ||
name: Copy labels from linked issues | ||
steps: | ||
- name: copy-labels | ||
uses: michalvankodev/copy-issue-labels@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
There is also support for different workflows to trigger sync of the labels with `issue-number` parameter | ||
|
||
```yml | ||
steps: | ||
- name: copy-labels | ||
uses: michalvankodev/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.inputs.issue }} | ||
``` |