fix(ci): gh pr create doesn't support --json flag - #65221
Merged
Conversation
The js-autofix workflow used 'gh pr create --json number --jq .number' to capture the PR number, but 'gh pr create' doesn't support --json. Extract the PR number from the URL that 'gh pr create' prints instead.
ethernet8023
enabled auto-merge (squash)
July 15, 2026 21:23
13 tasks
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
The js-autofix workflow used 'gh pr create --json number --jq .number' to capture the PR number, but 'gh pr create' doesn't support --json. Extract the PR number from the URL that 'gh pr create' prints instead.
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
The js-autofix workflow used 'gh pr create --json number --jq .number' to capture the PR number, but 'gh pr create' doesn't support --json. Extract the PR number from the URL that 'gh pr create' prints instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The js-autofix workflow (merged in #65186) uses
gh pr create --json number --jq '.number'to capture the PR number, butgh pr createdoesn't supportthe
--jsonflag — every workflow run fails withunknown flag: --json.Extract the PR number from the URL that
gh pr createprints to stdoutinstead (format:
https://github.com/<org>/<repo>/pull/<number>).Related Issue
Follow-up fix for the workflow merged in #65186.
Type of Change
Changes Made
.github/workflows/js-autofix.yml: replacedgh pr create --json number --jq '.number'withPR_URL=$(gh pr create ...)+PR_NUM=$(echo "$PR_URL" | grep -oE '[0-9]+$')How to Test
auto-fix lint issues & formattingworkflow (push a JS file with a fixable lint issue to main, orworkflow_dispatch).apply-patchjob should successfully create a PR onbot/js-autofixinstead of failing withunknown flag: --json.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A: CI workflow change, no Python tests affectedyaml.safe_load)Documentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Failing run after #65186 merged: