ci(sync-docs): use shared REPO_TOKEN secret#225
Merged
Conversation
Allow manual invocation of the docs-sync workflow without cutting a
release. Useful for:
- testing sync output against a non-main vc-docs branch (e.g. a long-
running integration branch) before changes reach production
- re-running sync after fixing a docs-sync bug without a release cycle
- backfilling docs into a release branch
Inputs:
- target_branch (default: main) — vc-docs branch to checkout and open
the auto-PR against
- ref_label (default: UTC timestamp) — used in the auto-PR branch name
('auto/sync-vc-shell-<label>') and PR title
Release-triggered runs (release: published) keep their existing
behavior: target main, label with the release tag.
Inputs are passed via env vars (not interpolated directly into shell)
to avoid command injection.
The org-wide REPO_TOKEN is already used by release.yml and storybook-ci.yml in this repo and by deploy.yml in vc-docs. Reuse it instead of requiring a separate VC_DOCS_BOT_TOKEN secret — one less thing to provision and rotate.
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.
Summary
Hotfix on top of #223 / #224. The new workflow_dispatch trigger fails immediately with
Input required and not supplied: tokenbecause theVC_DOCS_BOT_TOKENsecret was never provisioned in this repo. Switch to the org-wideREPO_TOKENsecret that is already used byrelease.ymlandstorybook-ci.ymlin this repo, and bydeploy.ymlin vc-docs — one secret to rotate instead of two.What changes
.github/workflows/sync-docs.yml:token: \${{ secrets.VC_DOCS_BOT_TOKEN }}→token: \${{ secrets.REPO_TOKEN }}(both checkout step andGH_TOKENenv on the PR step)Behavior
No behavioral change. Same workflow, same triggers, same auto-PR shape (with
auto-generatedlabel). Only the underlying token identity differs.REPO_TOKENmust havecontents:writeandpull-requests:writeonVirtoCommerce/vc-docs— same permissions docs-deploy already exercises in vc-docs.Test plan
target_branch: docs/vc-shell-integration→ Runauto-generatedlabel, no token error