fix: codeberg_api_all does not accept a custom token parameter (#198)
Add optional second TOKEN parameter to codeberg_api_all in lib/env.sh, defaulting to $CODEBERG_TOKEN. Pass $REVIEW_BOT_TOKEN at the dismiss block in review-pr.sh so reviews are fetched as the review bot account. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dfd4e00d34
commit
17907063f6
2 changed files with 3 additions and 1 deletions
|
|
@ -759,7 +759,7 @@ if [ "${POST_CODE}" = "201" ]; then
|
|||
REVIEW_BOT_LOGIN=$(printf '%s' "$REVIEW_BOT_RESP" | jq -r '.login // empty')
|
||||
fi
|
||||
if [ -n "$REVIEW_BOT_LOGIN" ]; then
|
||||
ALL_PR_REVIEWS=$(codeberg_api_all "/pulls/${PR_NUMBER}/reviews" || echo "[]")
|
||||
ALL_PR_REVIEWS=$(codeberg_api_all "/pulls/${PR_NUMBER}/reviews" "$REVIEW_BOT_TOKEN" || echo "[]")
|
||||
while IFS= read -r review_id; do
|
||||
DISMISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
-X POST \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue