Skip to content

Per-job permissions for publish-pypi, release-doctor, sync-labels - #2720

Closed
arpitjain099 wants to merge 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions
Closed

Per-job permissions for publish-pypi, release-doctor, sync-labels#2720
arpitjain099 wants to merge 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Per-job permissions blocks on the three workflows still inheriting defaults:

  • publish-pypi.ymlcontents: read. The actual PyPI publish uses PYPI_TOKEN (or its Cloudflare-specific override), not the GitHub token. The runner only needs to check out the source.
  • release-doctor.ymlcontents: read. Just runs ./bin/check-release-environment as a sanity check.
  • sync-labels.ymlissues: write. micnncim/action-label-syncer@v1 creates/updates labels via GITHUB_TOKEN; that endpoint is part of the issues API, so issues: write is the documented minimum.

Per-job style matches ci.yml (contents: read + id-token: write) and detect-breaking-changes.yml (contents: read). YAML validated.

- publish-pypi: contents: read — publish step uses PYPI_TOKEN, not
  GITHUB_TOKEN.
- release-doctor: contents: read — only runs a local sanity-check
  script.
- sync-labels: issues: write — micnncim/action-label-syncer manages
  repo labels via GITHUB_TOKEN.

Matches the per-job permissions style already used in ci.yml and
detect-breaking-changes.yml.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@arpitjain099

Copy link
Copy Markdown
Contributor Author

Hi @musa-cf, gentle ping on this. PR has been open for 4 days without review. I noticed you've been on the recent-merger side of recent merges in this repo. When you have a moment, would you mind giving it a quick look? No urgency. Happy to address any feedback.

@musa-cf

musa-cf commented May 21, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution @arpitjain099.

@musa-cf

musa-cf commented May 21, 2026

Copy link
Copy Markdown
Contributor

Superseded by #2726 because I needed to rebase onto next and tweak a few other CI configs.

@musa-cf musa-cf closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants