Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
gh pr view "$pr" \
--repo "$GITHUB_REPOSITORY" \
--json mergeStateStatus,mergeable \
--jq -r '[.mergeStateStatus, .mergeable] | @tsv' 2>/dev/null
--jq '[.mergeStateStatus, .mergeable] | @tsv' 2>/dev/null
); then
case "$merge_state" in
CLEAN|UNSTABLE)
Expand Down
5 changes: 5 additions & 0 deletions test/cli.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ describe('code-foundry CLI', () => {
assert.match(workflow, /Waiting for release PR #\$pr to become mergeable under branch policy/)
assert.match(workflow, /--json mergeStateStatus,mergeable/)
assert.match(workflow, /'\[\.mergeStateStatus, \.mergeable\] \| @tsv'/)
assert.doesNotMatch(
workflow,
/--jq -r '\[\.mergeStateStatus, \.mergeable\] \| @tsv'/,
'gh pr view owns raw jq output; passing -r as a second argument makes the poll fail'
)
assert.match(workflow, /case "\$merge_state" in/)
assert.match(workflow, /CLEAN\|UNSTABLE\)\n\s+if \[ "\$mergeable" = MERGEABLE \]; then\n\s+break/)
assert.match(workflow, /DIRTY\)\n\s+echo "Release PR #\$pr is not mergeable \(mergeStateStatus=\$merge_state\)/)
Expand Down