You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh pr comment "$PR_NUMBER" --body "❌ Cannot approve: fork-based PRs are not supported for lake-gate. Please open the PR from a branch in the main repository."
echo "Checking authorization for user: $COMMENT_USER"
45
+
46
+
# Check if the user is in the approve-lake-gate alias in OWNERS_ALIASES file
47
+
if yq eval '.aliases.approve-lake-gate[] | select(. == "'${COMMENT_USER}'")' OWNERS_ALIASES | grep -q "${COMMENT_USER}"; then
48
+
echo "✅ User ${COMMENT_USER} is authorized to approve lake-gate PRs"
49
+
else
50
+
echo "❌ User ${COMMENT_USER} is not authorized to approve lake-gate PRs"
51
+
52
+
# Show available approvers for debugging
53
+
echo "Available approve-lake-gate users:"
54
+
yq eval '.aliases.approve-lake-gate[]' OWNERS_ALIASES || echo "No approve-lake-gate alias found"
55
+
56
+
gh pr comment "${{ github.event.issue.number }}" --body "❌ @${COMMENT_USER} is not authorized to approve lake-gate PRs. Only users listed in the approve-lake-gate alias in OWNERS_ALIASES file can approve."
0 commit comments