docs: document org setup for private cross-repo use - #4
Merged
Conversation
Using this action from another DivergentCodes repository needs two settings that are not discoverable from the code, and getting either wrong produces an error that does not say what is missing: the action repo must allow organization-wide access, and a token that can read DivergentCodes/commitlint must be supplied, because the default github.token is scoped to the calling repository and cannot read a different private repo. Add a section covering both, with a copy-pasteable workflow and a troubleshooting list mapping each symptom to the setting that causes it. Both README workflow examples were extracted and checked with actionlint. Refresh version references that named tags older than what is published. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSrrciEDBTuFNMtKocScML
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.
The action works from another DivergentCodes repo, but only after two settings that aren't discoverable from the code — and getting either wrong produces an error that doesn't say what's missing.
What's documented
1. Allow org-wide access to this action. Private actions aren't callable across repositories by default. Settings → Actions → General → Access → Accessible from repositories in the DivergentCodes organization. Without it, consuming workflows fail before the action even starts.
2. Supply a token that can read
DivergentCodes/commitlint. The defaultgithub.tokenis scoped to the repo running the workflow, so it can't read a different private repo. A fine-grained PAT with Contents: read on that one repo, stored as an org secretCOMMITLINT_READ_TOKEN.Plus a copy-pasteable consuming workflow and a troubleshooting list mapping each symptom to the setting that causes it —
terminal prompts disabled→ token; fails before any step → org access;could not read Usernamewith a token set → secret not visible to the consuming repo.Neither repo needs to be public. If
commitlintlater goes public, drop thegithub-tokenline and delete the secret; nothing else changes.Also
Refreshed version references that named older tags than what's published (
v1.1.0/v1.0.0→v1.1.2).Verification
action.ymland the workflow parse; actionlint cleanaction.ymlexactlyChecked, and not a problem
I suspected
version: latestwould break for a private module, since@latestnormally resolves via the public proxy. Tested it: it works, becauseGOPRIVATEmakes Go resolve directly from git. No change needed — noting it so the next person doesn't "fix" it either.🤖 Generated with Claude Code
https://claude.ai/code/session_01VSrrciEDBTuFNMtKocScML