Skip to content

release_pr: read the PR head sha without --jq - #203

Merged
rjd15372 merged 1 commit into
mainfrom
release-pr-classify-headsha
Oct 30, 2026
Merged

rjd15372 merged 1 commit into
mainfrom
release-pr-classify-headsha

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

Every push to a release PR crashed OBS Release PR in Resolve release PR → Classify (seen on #201, run 41059246214):

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The changelog-only push check (67a7f74) fetched the head with gh pr view --json headRefOid --jq .headRefOid. gh prints a jq string result unquoted, so _gh_json could not parse the bare sha. The fix reads the field from the plain --json output.

Only the synchronize path (--since) was affected. Open/reopen and workflow_dispatch never reach it.

Test added for the push path: it fails on the old script and passes with the fix (750 tests pass).

On a synchronize push, classify looked up the PR head with
`gh pr view --json headRefOid --jq .headRefOid`. gh prints a jq string
result unquoted, so json.loads failed on the bare sha and the Resolve
job of every push to a release PR crashed (PR #201). Read the field
from the --json output instead.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
@rjd15372
rjd15372 merged commit 2e7337c into main Oct 30, 2026
1 check passed
@rjd15372
rjd15372 deleted the release-pr-classify-headsha branch October 30, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant