From d455323ca862be9b7d4150f7405937dc42d11093 Mon Sep 17 00:00:00 2001 From: Keunes <11229646+keunes@users.noreply.github.com> Date: Fri, 10 May 2024 16:16:05 +0200 Subject: [PATCH] Add workflows to ping about play reviews --- .github/workflows/release-actions.yml | 35 +++++++++++++++++++++++++ .github/workflows/review-link-label.yml | 15 +++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/release-actions.yml create mode 100644 .github/workflows/review-link-label.yml diff --git a/.github/workflows/release-actions.yml b/.github/workflows/release-actions.yml new file mode 100644 index 000000000..09edc0937 --- /dev/null +++ b/.github/workflows/release-actions.yml @@ -0,0 +1,35 @@ +name: Release actions + +on: + release: + types: released + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: "Tag review replyers in closed issues with 'Needs: Review reply' label" + uses: actions/github-script@v7 + with: + script: | + const issue_number = context.issue.number; + const { data: issues } = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'closed', + labels: ['Needs: Review reply'] + }); + + if (issues.length > 0) { + for (const issue of issues) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: 'This feature or fix is now released! @AntennaPod/review-replyers, time to inform relevant reviews in Google Play console (please see links in one or more of the comments above).' + }); + } + } else { + console.log('No closed issues with label "Needs: Review reply" found.'); + } + \ No newline at end of file diff --git a/.github/workflows/review-link-label.yml b/.github/workflows/review-link-label.yml new file mode 100644 index 000000000..9f309543d --- /dev/null +++ b/.github/workflows/review-link-label.yml @@ -0,0 +1,15 @@ +name: Label issues with comments containing review links +on: + issue_comment: + types: [created, edited] + +jobs: + add_label: + name: Add label + if: ${{ contains(github.event.comment.body, 'https://play.google.com/apps/publish?account=8008695526664634386#ReviewDetailsPlace:p=de.danoeh.antennapod&reviewid=') || contains(github.event.comment.body, 'https://play.google.com/console/u/0/developers/8008695526664634386/app/4974638472012894302/user-feedback/review-details?reviewId=') }} + runs-on: ubuntu-latest + steps: + - name: Apply label + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: 'Needs: Review reply'