Skip to content

👷 ci(schemastore): sync fork before pushing branch#3942

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-schemastore-workflow-push
May 12, 2026
Merged

👷 ci(schemastore): sync fork before pushing branch#3942
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-schemastore-workflow-push

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

The Update SchemaStore run for the 4.54.0 tag failed at the push step with refusing to allow a Personal Access Token to create or update workflow .github/workflows/auto-update.yml without workflow scope. The SCHEMASTORE_TOKEN PAT carries repo scope only, which is correct for our use case, so the workflow itself has to stop pushing upstream workflow file changes through the fork.

The root cause is that gh repo fork --clone does not sync the fork when it already exists, so upstream/master was ahead of origin/master by upstream commits that touched .github/workflows/auto-update.yml. Force-pushing the update-tox-schema branch — built from upstream/master — carried those workflow edits into the fork, which trips GitHub's workflow-scope guard.

The fix calls gh repo sync on the fork's master first (the Sync API path only requires repo scope), then bases the working branch off origin/master. The resulting push contains a single new commit touching src/schemas/json/tox.json, so no workflow files cross the boundary.

The 4.54.0 SchemaStore update run failed because force-pushing the
update-tox-schema branch dragged in upstream commits that modified
.github/workflows/auto-update.yml, and SCHEMASTORE_TOKEN doesn't carry
the workflow scope.

Sync the fork's master via the GitHub Sync API before branching, then
base the working branch off origin/master. The push then carries only
the tox.json bump, so the workflow-scope guard no longer trips.
@gaborbernat gaborbernat requested a review from rahuldevikar as a code owner May 12, 2026 19:16
@gaborbernat gaborbernat enabled auto-merge (squash) May 12, 2026 19:19
@gaborbernat gaborbernat merged commit c86e876 into tox-dev:main May 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant