-
Notifications
You must be signed in to change notification settings - Fork 66
Change GITHUB_TOKEN secret for publish workflow #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughThe GitHub Actions publish workflow updates the environment variable for the release/publish step, switching GITHUB_TOKEN from secrets.GITHUB_TOKEN to secrets.MEILI_BOT_GH_PAT. No other steps, environment variables, or control flow are modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/publish.yml (1)
39-42: Switching to a PAT is fine—verify scopes and harden the workflow.
- Ensure
MEILI_BOT_GH_PATis a fine‑grained PAT limited to this repo, with only needed scopes: at minimumcontents:writeandpull_requests:write. Addworkflows:writeonly if you truly need to modify/trigger workflows.- Set an expiration and rotation policy for the PAT; store it at org level if multiple repos share it.
- Consider protecting it behind an Actions environment with required reviewers (e.g.,
environment: release), and move the secret into that environment.Optional hardening:
- Because you’re not using the default
GITHUB_TOKEN, set minimal default permissions to reduce blast radius:# Add near the top level of the workflow (sibling of `on:`) permissions: contents: read
- Or restrict at the job level similarly if preferred.
Checklist to confirm:
- The secret
MEILI_BOT_GH_PATexists in the repo/org and is available to this workflow.- The PAT scopes are minimal (contents/pull_requests write; workflows write only if required).
- Environment protection (optional) is configured if you want human approval before publishing.
- This change indeed resolves the CI trigger issue with
changesets/action@v1(expected when replacing the defaultGITHUB_TOKEN).
Try to fix bug of CI not running
Summary by CodeRabbit
Chores
No User-Facing Changes