Merge pull request #55 from privilegedescalation/fix/dual-approval-bot-suffix

fix(ci): match [bot] suffix in dual-approval-check reviewer usernames
This commit is contained in:
privilegedescalation-ceo[bot]
2026-03-22 05:24:20 +00:00
committed by GitHub
+6 -3
View File
@@ -53,13 +53,16 @@ jobs:
echo "Checking approvals on PR #${PR_NUMBER} in ${REPO}"
REVIEWS=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" 2>&1)
REVIEWS=$(curl -sf \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${REPO}/pulls/${PR_NUMBER}/reviews")
CTO_APPROVED=$(echo "${REVIEWS}" | jq -r --arg user "${CTO_REVIEWER}" \
'[.[] | select(.user.login == $user)] | last | .state == "APPROVED"')
'[.[] | select(.user.login == $user or .user.login == ($user + "[bot]"))] | last | .state == "APPROVED"')
QA_APPROVED=$(echo "${REVIEWS}" | jq -r --arg user "${QA_REVIEWER}" \
'[.[] | select(.user.login == $user)] | last | .state == "APPROVED"')
'[.[] | select(.user.login == $user or .user.login == ($user + "[bot]"))] | last | .state == "APPROVED"')
echo "CTO (${CTO_REVIEWER}) approved: ${CTO_APPROVED}"
echo "QA (${QA_REVIEWER}) approved: ${QA_APPROVED}"