diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fa60011c6..36d2d0958 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,11 +4,12 @@ * @stackrox/scanner -# The RHTAP maintainers for ACS review all changes related to the Konflux pipelines, such as new +# The Konflux maintainers for ACS review all changes related to the Konflux pipelines, such as new # pipelines, parameter changes or automated task updates as well as Dockerfile updates. -# rhacs-bot auto-approves MintMaker PRs for automated task and security updates. -**/konflux.*Dockerfile @stackrox/rhtap-maintainers @rhacs-bot -/.konflux/ @stackrox/rhtap-maintainers @rhacs-bot -/.tekton/ @stackrox/rhtap-maintainers @rhacs-bot -rpms.* @stackrox/rhtap-maintainers @rhacs-bot -.github/renovate.json5 @stackrox/rhtap-maintainers +# Release engineers need to merge MintMaker PRs at the time of release. +# rhacs-bot needs ability to auto-approve MintMaker PRs for automated task and security updates. +**/konflux.*Dockerfile @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot +/.konflux/ @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot +/.tekton/ @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot +rpms.* @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot +.github/renovate.json5 @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email diff --git a/.github/workflows/tag-more-reviewers.yaml b/.github/workflows/tag-more-reviewers.yaml new file mode 100644 index 000000000..f4233751c --- /dev/null +++ b/.github/workflows/tag-more-reviewers.yaml @@ -0,0 +1,30 @@ +name: Tag more reviewers + +on: + pull_request: + types: + - review_requested + +jobs: + tag-konflux-maintainers: + # We have lots of PR traffic from MintMaker (acting as `red-hat-konflux[bot]`), and so it's unsustainable to go + # through these emails every day. Therefore, the notifications are disabled for `konflux-maintainers-no-email` + # team that's set as owner in CODEOWNERS for the Konflux stuff. + # At the same time, we want to be notified when humans, not the bot, request reviews (which happens automatically + # again through CODEOWNERS) for the Konflux-related files. This job invites `konflux-maintainers` team for review + # for such cases. + if: | + github.event.requested_team.name == 'konflux-maintainers-no-email' && + github.event.pull_request.user.login != 'red-hat-konflux[bot]' + env: + GH_TOKEN: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }} + runs-on: ubuntu-latest + steps: + - name: Tag Konflux Maintainers for review + run: | + exec gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers" \ + --input - <<< '{ "team_reviewers": [ "konflux-maintainers" ] }'