From e46006f828ff6866bc393b635568d9b753d55375 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Tue, 4 Jul 2023 16:44:41 +0300 Subject: [PATCH 01/10] Create link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/link-issue-to-branch.yml diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml new file mode 100644 index 0000000000..ab3bcc021f --- /dev/null +++ b/.github/workflows/link-issue-to-branch.yml @@ -0,0 +1,17 @@ +name: Move issues to In progress status when it is linked to a branch + +on: + issues: + types: + - branches_url + +jobs: + move-issue-when-linked: + name: Move issues to In progress status when a branch/PR is linked + runs-on: ubuntu-latest + steps: + - uses: alex-page/github-project-automation-plus@v0.8.3 + with: + project-url: https://github.com/orgs/UnitTestBot/projects/2 + column: In Progress + github-token: ${{ secrets.GITHUB_TOKEN }} From e3ed86cabbc0fd72170c23d381e35d374274eb3d Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Tue, 4 Jul 2023 16:57:49 +0300 Subject: [PATCH 02/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index ab3bcc021f..35c2dd0921 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -3,7 +3,7 @@ name: Move issues to In progress status when it is linked to a branch on: issues: types: - - branches_url + - linked jobs: move-issue-when-linked: From fdaaa7bcb04766d8e0de9aa2eb9e837eb5aff950 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Tue, 4 Jul 2023 17:10:03 +0300 Subject: [PATCH 03/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index 35c2dd0921..4739c6eebc 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -12,6 +12,6 @@ jobs: steps: - uses: alex-page/github-project-automation-plus@v0.8.3 with: - project-url: https://github.com/orgs/UnitTestBot/projects/2 + project-url: https://github.com/orgs/AleLise/projects/2 column: In Progress github-token: ${{ secrets.GITHUB_TOKEN }} From 412b4099f5dff68e1eae9330e90f337301820891 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Tue, 4 Jul 2023 17:15:25 +0300 Subject: [PATCH 04/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index 4739c6eebc..8e7ed982d5 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -7,10 +7,10 @@ on: jobs: move-issue-when-linked: - name: Move issues to In progress status when a branch/PR is linked + name: Move issues to In Progress status when a branch/PR is linked runs-on: ubuntu-latest steps: - - uses: alex-page/github-project-automation-plus@v0.8.3 + - uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 with: project-url: https://github.com/orgs/AleLise/projects/2 column: In Progress From ec7724767feda82d481c0e30a73b14d4b3f665cb Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Tue, 4 Jul 2023 17:39:42 +0300 Subject: [PATCH 05/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index 8e7ed982d5..a85416b6a1 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -2,8 +2,8 @@ name: Move issues to In progress status when it is linked to a branch on: issues: - types: - - linked + linked: + - pr jobs: move-issue-when-linked: From 6ddbc2a760fedccf4d8ee401df86a0f4944dd336 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Wed, 5 Jul 2023 10:50:55 +0300 Subject: [PATCH 06/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 30 +++++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index a85416b6a1..d8056125d8 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -1,17 +1,33 @@ name: Move issues to In progress status when it is linked to a branch on: - issues: - linked: - - pr + pull_request_target: + types: [ edited, synchronize, opened, reopened ] jobs: - move-issue-when-linked: - name: Move issues to In Progress status when a branch/PR is linked + checker: runs-on: ubuntu-latest + steps: - - uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 + - uses: actions/checkout@v2 + + - name: Issue Validator + uses: HarshCasper/validate-issues-over-pull-requests@v0.1.1 + id: validator with: - project-url: https://github.com/orgs/AleLise/projects/2 + prbody: ${{ github.event.pull_request.body }} + prurl: ${{ github.event.pull_request.url }} + + - name: PR has a valid Issue + uses: alex-page/github-project-automation-plus@v0.8.3 + if: ${{ steps.validator.outputs.valid == 1 }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PRNUM: ${{ github.event.pull_request.number }} + with: + project-url: https://github.com/orgs/UnitTestBot/projects/2 column: In Progress github-token: ${{ secrets.GITHUB_TOKEN }} + + run: | + gh pr edit $PRNUM --add-label "wontfix" From 2c1a48f04a4e21e2e65f6f9698516e10f6afa05d Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Wed, 5 Jul 2023 10:53:24 +0300 Subject: [PATCH 07/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index d8056125d8..177c64767f 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -25,9 +25,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PRNUM: ${{ github.event.pull_request.number }} with: - project-url: https://github.com/orgs/UnitTestBot/projects/2 + project-url: https://github.com/orgs/AleLise/projects/2 column: In Progress github-token: ${{ secrets.GITHUB_TOKEN }} run: | gh pr edit $PRNUM --add-label "wontfix" + echo Link to From d0f1978f75fdd5e7d6e5b0269e81a1ff2f478b6d Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Wed, 5 Jul 2023 11:16:17 +0300 Subject: [PATCH 08/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 40 +++++++++++++--------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index 177c64767f..a0bd4dbab2 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -9,26 +9,32 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Find linked issues + id: find-linked-issues + uses: Ismoh-Games/find-linked-issues@v0.0.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + pull-request-number: ${{ github.event.pull_request.number }} + pull-request-body: ${{ github.event.pull_request.body }} + copy-issues-labels: true # optional + include-closed-issues: true # optional + + # Use the output from the `find-linked-issues` step + - name: Use the output + run: | + echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}" + echo "linked-issues: ${{ steps.find-linked-issues.outputs.linked-issues }}" + echo "pull-request-labels: ${{ steps.find-linked-issues.outputs.pull-request-labels }}" - - name: Issue Validator - uses: HarshCasper/validate-issues-over-pull-requests@v0.1.1 - id: validator - with: - prbody: ${{ github.event.pull_request.body }} - prurl: ${{ github.event.pull_request.url }} - - - name: PR has a valid Issue - uses: alex-page/github-project-automation-plus@v0.8.3 - if: ${{ steps.validator.outputs.valid == 1 }} - env: + - name: Move linked issues to In Progress + if: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues == 'True' }} + uses: alex-page/github-project-automation-plus@v0.8.3 + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PRNUM: ${{ github.event.pull_request.number }} - with: + ISSUENUM: ${{steps.find-linked-issues.outputs.linked-issues[0].number }} + with: project-url: https://github.com/orgs/AleLise/projects/2 column: In Progress github-token: ${{ secrets.GITHUB_TOKEN }} - run: | - gh pr edit $PRNUM --add-label "wontfix" - echo Link to From 2cd96ad2915d47a5149dc686bebaf8e09a29ff13 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Wed, 5 Jul 2023 11:22:35 +0300 Subject: [PATCH 09/10] Update link-issue-to-branch.yml --- .github/workflows/link-issue-to-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index a0bd4dbab2..33b4d1d696 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Find linked issues id: find-linked-issues - uses: Ismoh-Games/find-linked-issues@v0.0.1 + uses: Ismoh-Games/find-linked-issues@v0.0.12 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.repository }} From f1c9ffd063e53d305f017905eef16b3950f03e53 Mon Sep 17 00:00:00 2001 From: Alena Lisevych Date: Wed, 5 Jul 2023 11:25:35 +0300 Subject: [PATCH 10/10] Fixes #13 --- .github/workflows/link-issue-to-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-issue-to-branch.yml b/.github/workflows/link-issue-to-branch.yml index 33b4d1d696..014bba14f7 100644 --- a/.github/workflows/link-issue-to-branch.yml +++ b/.github/workflows/link-issue-to-branch.yml @@ -20,7 +20,7 @@ jobs: copy-issues-labels: true # optional include-closed-issues: true # optional - # Use the output from the `find-linked-issues` step + # Use the output from the `find-linked-issues` step - name: Use the output run: | echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}"