fix(ci): URL-encode label name in labeler-conflict.yml
All checks were successful
Build & Test Map Renderer / build (ubuntu-latest) (pull_request) Successful in 3m8s
CRLF Check / CRLF Check (pull_request) Successful in 47s
Build & Test Debug / build (ubuntu-latest) (pull_request) Successful in 13m35s
RGA schema validator / YAML RGA schema validator (pull_request) Successful in 39s
Map file schema validator / YAML map schema validator (pull_request) Successful in 2m15s
YAML Linter / YAML Linter (pull_request) Successful in 3m15s
Check Merge Conflicts / check-conflicts (pull_request_target) Successful in 1s
Labels: PR / labeler (pull_request_target) Successful in 18s
Labels: Size / size-label (pull_request_target) Successful in 2s
Build & Test Map Renderer / Build & Test Debug (pull_request) Successful in 1s
Test Packaging / Test Packaging (pull_request) Successful in 34m0s
Build & Test Debug / Build & Test Debug (pull_request) Successful in 2s

The DELETE request for removing the "S: Merge Conflict" label was
failing with exit code 3 because the label name contains spaces and
a colon that weren't URL-encoded.

Uses jq @uri filter to properly encode: "S: Merge Conflict" →
"S%3A%20Merge%20Conflict"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2025-12-23 22:45:32 +01:00
parent fb5c9145d2
commit f27594b4e5

View File

@@ -57,8 +57,10 @@ jobs:
if [ -n "$HAS_LABEL" ]; then
echo "Removing stale conflict label..."
# URL-encode the label name (handles spaces, colons, etc.)
LABEL_NAME_ENCODED=$(echo "$LABEL_NAME" | jq -rR @uri)
curl -s -X DELETE -H "Authorization: token $API_TOKEN" \
"$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_INDEX/labels/$LABEL_NAME"
"$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_INDEX/labels/$LABEL_NAME_ENCODED"
echo "Conflict label removed."
fi
fi