From d373f2b1c40f901cdcf9ab18fea13cff97a3bd24 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Wed, 13 Jul 2022 00:00:53 -0400 Subject: [PATCH] For #25999 - Add GitHub actions to tag milestones, link issues and reopen issues for QA --- .github/PULL_REQUEST_TEMPLATE | 9 +++++++++ .github/workflows/issue-linker.yml | 21 +++++++++++++++++++++ .github/workflows/milestone.yml | 20 ++++++++++++++++++++ .github/workflows/qa-needed.yml | 22 ++++++++++++++++++++++ .github/workflows/reopen-for-qa-needed.yml | 21 +++++++++++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 .github/workflows/issue-linker.yml create mode 100644 .github/workflows/milestone.yml create mode 100644 .github/workflows/qa-needed.yml create mode 100644 .github/workflows/reopen-for-qa-needed.yml diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 35934de05..d259b7bbc 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -6,8 +6,17 @@ - [ ] **Screenshots**: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not - [ ] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features. In addition, it includes a screenshot of a successful [accessibility scan](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor&hl=en_US) to ensure no new defects are added to the product. +### QA + +- [ ] **QA Needed** + ### To download an APK when reviewing a PR: 1. click on Show All Checks, 2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark, 3. click on the "Fenix - assemble" task, then click "Run Artifacts". 4. the APK links should be on the left side of the screen, named for each CPU architecture + +### GitHub Automation + + +Used by GitHub Actions. diff --git a/.github/workflows/issue-linker.yml b/.github/workflows/issue-linker.yml new file mode 100644 index 000000000..258de0689 --- /dev/null +++ b/.github/workflows/issue-linker.yml @@ -0,0 +1,21 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/ + +name: Issue Linker + +on: + pull_request_target: + branches: + - main + +jobs: + issue_linker: + runs-on: ubuntu-latest + steps: + - name: Issue Linker + uses: gabrielluong/issue-linker@1.0.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + commit-regexp: "#(\\d+)+" + section: "### GitHub Automation" diff --git a/.github/workflows/milestone.yml b/.github/workflows/milestone.yml new file mode 100644 index 000000000..058a678da --- /dev/null +++ b/.github/workflows/milestone.yml @@ -0,0 +1,20 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/ + +name: Tag Milestone + +on: + issues: + types: + - closed + +jobs: + milestone: + runs-on: ubuntu-latest + if: github.actor == 'mergify[bot]' + steps: + - name: Tag Milestone + uses: gabrielluong/milestone@1.0.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/qa-needed.yml b/.github/workflows/qa-needed.yml new file mode 100644 index 000000000..22923158e --- /dev/null +++ b/.github/workflows/qa-needed.yml @@ -0,0 +1,22 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/ + +name: QA Needed + +on: + pull_request_target: + branches: + - main + +jobs: + qa_needed: + runs-on: ubuntu-latest + steps: + - name: QA Needed + uses: gabrielluong/qa-needed@1.0.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + label: "eng:reopen-for-qa" + check-regexp: "- \\[([ xX]?)\\] \\*\\*QA Needed\\*\\*" + commit-regexp: "#(\\d+)+" diff --git a/.github/workflows/reopen-for-qa-needed.yml b/.github/workflows/reopen-for-qa-needed.yml new file mode 100644 index 000000000..f9a131d9a --- /dev/null +++ b/.github/workflows/reopen-for-qa-needed.yml @@ -0,0 +1,21 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/ + +name: Reopen for QA Needed + +on: + issues: + types: + - closed + +jobs: + reopen_qa_needed: + runs-on: ubuntu-latest + steps: + - name: Reopen for QA Needed + uses: gabrielluong/reopen-for-qa-needed@1.0.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + reopen-label: "eng:reopen-for-qa" + qa-label: "eng:qa:needed"