Skip to content

Commit d01f69e

Browse files
silehtclaude
andauthored
fix: trim trailing newline from SCOPES before splitting (#140)
The heredoc (`<<<`) appends a trailing newline to the SCOPES string, causing jq's `split(",")` to produce an invalid last scope entry. Adding `rtrimstr("\n")` before splitting fixes this. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f1f0090 commit d01f69e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ runs:
103103
set -euo pipefail
104104
FILE="$RUNNER_TEMP/mergify-scopes.json"
105105
# Convert comma-separated SCOPES into a JSON array
106-
SCOPES_JSON=$(jq -R -s 'split(",")' <<< "$SCOPES")
106+
SCOPES_JSON=$(jq -R -s 'rtrimstr("\n") | split(",")' <<< "$SCOPES")
107107
jq -n \
108108
--arg base "$BASE" \
109109
--arg head "$HEAD" \

0 commit comments

Comments
 (0)