@@ -86,16 +86,29 @@ jobs:
8686 - name : Notify final reviewer team
8787 env :
8888 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89+ ORG_PAT : ${{ secrets.ORG_PAT }} # PAT with repo + read:org for team review request
90+
8991 run : |
9092 PR_NUMBER=${{ github.event.pull_request.number }}
9193 REVIEWER=${{ github.event.review.user.login }}
9294 TEAM_HANDLE="@${{ github.repository_owner }}/ai4sdlc-approval"
93- COMMENT="$TEAM_HANDLE PR #$PR_NUMBER has been approved by @$REVIEWER and is ready for final review."
95+ COMMENT="$TEAM_HANDLE PR #$PR_NUMBER has a new review comment from @$REVIEWER and is ready for final review."
96+
9497 curl -X POST \
9598 -H "Authorization : token $GITHUB_TOKEN" \
9699 -H "Accept : application/vnd.github+json" \
100+ -H "Content-Type : application/json" \
97101 -d "{\"body\" : \"$COMMENT\"}" \
98102 https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments
103+
104+ # 2) Request review from the approval team
105+ curl -X POST \
106+ -H "Authorization : token $ORG_PAT" \
107+ -H "Accept : application/vnd.github+json" \
108+ -H "Content-Type : application/json" \
109+ -d "{\"team_reviewers\":[\"ai4sdlc-approval\"]}" \
110+ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/requested_reviewers -v
111+
99112
100113 # Build stage - converting md file to html using MkDocs
101114 convert_md_to_html :
@@ -153,7 +166,7 @@ jobs:
153166 # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
154167 # aws-region: us-east-1 # change if needed
155168 - name : configure aws credentials
156- uses : aws-actions/configure-aws-credentials@v1.7.0
169+ uses : aws-actions/configure-aws-credentials@v2
157170 with :
158171 role-to-assume : arn:aws:iam::677043464939:role/GitHubAction-AssumeRoleWithAction
159172 role-session-name : GitHub_to_AWS_via_FederatedOIDC
0 commit comments