Skip to content

👷 ci(schemastore): fix update workflow auth and PR creation#3826

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:relase
Feb 25, 2026
Merged

👷 ci(schemastore): fix update workflow auth and PR creation#3826
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:relase

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat commented Feb 25, 2026

The update-schemastore workflow fails in two ways when triggered by a release tag. First, git push couldn't authenticate because GH_TOKEN is only consumed by gh CLI, not raw git HTTPS operations. Second, gh pr create --repo SchemaStore/schemastore fails with "you must first push the current branch to a remote, or use the --head flag" because it can't infer which fork owns the branch when targeting an upstream repo.

The fix uses gh auth setup-git to register gh as a git credential helper (bridging the auth gap for git push), and dynamically resolves the fork owner via gh api user to pass --head <owner>:<branch> explicitly to both gh pr create and gh pr view/gh pr edit.

The GH_TOKEN env var is only used by gh CLI natively, not by raw git
commands. The git push to the SchemaStore fork fails because HTTPS
credentials aren't configured. Adding gh auth setup-git registers gh
as a git credential helper, bridging the authentication gap.
@gaborbernat gaborbernat added type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.) bot:chronographer:skip labels Feb 25, 2026
@gaborbernat gaborbernat merged commit eef7a2f into tox-dev:main Feb 25, 2026
28 checks passed
@gaborbernat gaborbernat changed the title 👷 ci(schemastore): fix git push auth in update workflow 👷 ci(schemastore): fix update workflow auth and PR creation Feb 25, 2026
gaborbernat added a commit to gaborbernat/tox that referenced this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant