diff --git a/.github/workflows/auto_cherry_pick_merge.yaml b/.github/workflows/auto_cherry_pick_merge.yaml index 924bc9fccfd..0f0e9e33b35 100644 --- a/.github/workflows/auto_cherry_pick_merge.yaml +++ b/.github/workflows/auto_cherry_pick_merge.yaml @@ -40,7 +40,7 @@ jobs: - name: Wait for other status checks to Pass id: waitforstatuschecks - uses: lewagon/wait-on-check-action@v1.3.1 + uses: lewagon/wait-on-check-action@v1.3.3 with: ref: ${{ github.head_ref }} repo-token: ${{ secrets.CHERRYPICK_PAT }} diff --git a/.github/workflows/dependency_merge.yml b/.github/workflows/dependency_merge.yml index 3e1c62e5a97..eb2606928b7 100644 --- a/.github/workflows/dependency_merge.yml +++ b/.github/workflows/dependency_merge.yml @@ -51,7 +51,7 @@ jobs: - name: Wait for other status checks to Pass id: waitforstatuschecks - uses: lewagon/wait-on-check-action@v1.3.1 + uses: lewagon/wait-on-check-action@v1.3.3 with: ref: ${{ github.head_ref }} repo-token: ${{ secrets.CHERRYPICK_PAT }} diff --git a/.github/workflows/tier_2_reviews.yaml b/.github/workflows/tier_2_reviews.yaml new file mode 100644 index 00000000000..28b290791df --- /dev/null +++ b/.github/workflows/tier_2_reviews.yaml @@ -0,0 +1,37 @@ +# Github Action to Automatically assign T2 Reviewers to framework touched PRs +name: Tier2 Reviewers + +on: + pull_request: + paths: ['*', '.github/**', 'conf/**', 'pytest_fixtures/**', 'pytest_plugins/**', 'robottelo/**', '!robottelo/constants/*', 'scripts/**', 'tests/foreman/sanity/*'] + +permissions: + pull-requests: write + +env: + NUMBER: ${{ github.event.number }} + REVIEWERS: '["robottelo-tier-2-reviewers"]' + LABELS: '["Framework Changes"]' + +jobs: + assign-label-T2-reviewers: + name: Assign Tier2 Reviewers to the PR + runs-on: ubuntu-latest + steps: + - name: Add Labels to the PR + run: | + echo "Adding applicable labels to the PR $NUMBER" + curl -L -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.CHERRYPICK_PAT }}" \ + https://api.github.com/repos/SatelliteQE/robottelo/issues/$NUMBER/labels \ + -d '{"labels": '"$LABELS"'}' + - name: Assign T2 Reviewers Team to the PR + run: | + echo "Assigning T2 Reviewers to the PR $number" + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.CHERRYPICK_PAT }}" \ + https://api.github.com/repos/SatelliteQE/robottelo/pulls/$NUMBER/requested_reviewers \ + -d '{"team_reviewers": '"${REVIEWERS}"'}'