diff --git a/.github/workflows/copy-labels.yml b/.github/workflows/copy-labels.yml index e1d576a..4519f6b 100644 --- a/.github/workflows/copy-labels.yml +++ b/.github/workflows/copy-labels.yml @@ -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 }} diff --git a/README.md b/README.md index 90be084..db9508c 100644 --- a/README.md +++ b/README.md @@ -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/copy-issue-labels@v0.2.12 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.inputs.issue }} +``` \ No newline at end of file