diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 25a35e6cd0..1af44ed7da 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,14 +4,14 @@ Replace this block with what this PR does and why. Describe what you'd like revi ) ### Jira ticket -_Link to related jira ticket ([Use the smart commits](https://support.atlassian.com/bitbucket-cloud/docs/use-smart-commits/))_ +_Link to related jira ticket ([Use the smart commits](https://support.atlassian.com/bitbucket-cloud/docs/use-smart-commits/)). Short version (e.g. MTT-123) also works and gets auto-linked_ ### Changelog [//]: # (updated with all public facing changes - API changes, UI/UX changes, behaviour changes, bug fixes. Remove if not relevant.) - Added: The package whose Changelog should be added to should be in the header. Delete the changelog section entirely if it's not needed. - Fixed: If you update multiple packages, create a new section with a new header for the other package. -- Removed/Deprecated/Changed: Each bullet should be prefixed with Added, Fixed, Removed, Deprecated, or Changed to indicate where the entry should go +- Removed/Deprecated/Changed: Each bullet should be prefixed with Added, Fixed, Removed, Deprecated, or Changed to indicate where the entry should go. + ### Functional Testing [//]: # (If checked, List manual tests that have been performed.) _Manual testing :_ @@ -50,12 +52,13 @@ _Does the change require QA team to:_ - [ ] `Review automated tests`? - [ ] `Execute manual tests`? +- [ ] `Provide feedback about the PR`? -If any boxes above are checked, please add QA as a PR reviewer. +If any boxes above are checked the QA team will be automatically added as a PR reviewer. -## Backport +## Backports [//]: # ( This section is REQUIRED and should link to the PR that targets other NGO version which is either develop or develop-2.0.0 branch Add the following to the PR title: "\[Backport\] ..." If this is not needed, for example feature specific to NGOv2.X, then just mention this fact. -) \ No newline at end of file +) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-description-validation.yml similarity index 75% rename from .github/workflows/pr-verification.yml rename to .github/workflows/pr-description-validation.yml index 866a1aa344..f5d0a40248 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-description-validation.yml @@ -1,4 +1,4 @@ -# This workflow is designed to verify that the pull request description contains a required sections that are important from quality perspective. +# This workflow is designed to verify that the pull request description contains a required sections that are important from quality perspective. # ## Backport section is important as a reminder to account for backports for anyone that works with NGO repository (to 1.X or 2.X branches respectively). # ## Testing & QA section is important to ensure that the PR has appropriate testing coverage and is important when QA will evaluate PRs before Playtesting for the release. # ## Documentation section is important to ensure that the documentation is updated with the changes made in the PR. @@ -6,7 +6,7 @@ # If any of the sections is missing, the workflow will fail and block the PR from merging, prompting the developer to add those sections to the PR description. # The workflow is configured to run when PR is created as well as when it is edited which also counts simple description edits. -name: "NGO - PR Verification" +name: "NGO - PR description validation" on: pull_request: @@ -17,7 +17,7 @@ on: - release/* jobs: - pr-verification: + pr-description-validation: runs-on: ubuntu-latest steps: - name: Checkout code @@ -33,8 +33,8 @@ jobs: // List of mandatory PR sections const requiredSections = [ { - header: '## Backport', - description: 'PR description must include a "## Backport" section. Please add this section and provide information about this PR backport to develop or develop-2.0.0 branch respectively or explain why backport is not needed.' + header: '## Backports', + description: 'PR description must include a "## Backports" section. Please add this section and provide information about this PR backport to develop or develop-2.0.0 branch respectively or explain why backport is not needed.' }, { header: '## Testing & QA', @@ -43,6 +43,10 @@ jobs: { header: '## Documentation', description: 'PR description must include a "## Documentation" section. Please add this section and provide information about the documentation changes made in this PR. It is important to keep the documentation up to date with the code changes.' + }, + { + header: '## Jira ticket', + description: 'PR description must include a "## Jira ticket" section. Please add this section and provide a link to the Jira ticket that corresponds to this PR. General rule should be that if the PR takes you more then a day of work it should have Jira ticket. Otherwise you can always write "N/A" in this section.' } ]; @@ -59,4 +63,4 @@ jobs: message += '\n\nPlease add them to your PR description.'; core.setFailed(message); - } \ No newline at end of file + } diff --git a/.github/workflows/qa-reviewer-assignment.yml b/.github/workflows/qa-reviewer-assignment.yml new file mode 100644 index 0000000000..8057857a4a --- /dev/null +++ b/.github/workflows/qa-reviewer-assignment.yml @@ -0,0 +1,36 @@ +# This workflow depend on the content of .github/pull_request_template.md file, which should contain the required sections that the script checks for +# This also works in parallel with .github/workflows/pr-description-validation.yml which validates PR format +# In contrast to .github/workflows/pr-description-validation.yml, this workflow is conditional and aims to ease the process of requesting QA review by automatically assigning the QA team whenever a checkbox is marked + +# In case that the given checkboxes are marked the script will automatically add netcode-qa team as a reviewer. + +name: 'Assign QA Reviewer' + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + assign-qa: + # This job only runs if the checkbox in the PR description exist and is checked. + if: > + contains(github.event.pull_request.body, '- [x] `Review automated tests`') || + contains(github.event.pull_request.body, '- [x] `Execute manual tests`') || + contains(github.event.pull_request.body, '- [x] `Provide feedback about the PR`') + runs-on: ubuntu-latest + + + steps: + + - name: 'Assign QA Team' + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GH_TOKEN }} + script: | + github.rest.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + team_reviewers: ['netcode-qa'] + }); + console.log('Assigned netcode-qa for review.');