zed/.github
John D. Swanson 8a467a5958
Update PR size check workflow (#51948)
## Context

The PR size check workflow has been failing with `403 Resource not
accessible by integration` on every run
([example](https://github.com/zed-industries/zed/actions/runs/23281894554/job/67698634490)).
The root cause is a workflow-level `permissions` block that set a
read-only ceiling, silently preventing the job-level `issues: write` and
`pull-requests: write` grants from taking effect.

This also adds an idempotency improvement: when a new push doesn't
change the PR's size bracket, the workflow now skips the label
remove/re-add cycle, eliminating unnecessary timeline noise.

## How to Review

- Focus on `.github/workflows/pr-size-check.yml` — that's the only file
changed
- Lines 17-23: workflow-level `permissions` block removed, job-level
retained
- Lines 81-112: new `alreadyCorrect` check wraps the label mutation
block

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-19 12:36:00 -04:00
..
actions ci: Fix docs build post #45130 (#45330) 2025-12-19 03:40:27 +00:00
DISCUSSION_TEMPLATE docs: Improve feature process (#51425) 2026-03-13 00:36:21 +03:00
ISSUE_TEMPLATE Remove deprecated Gemini 3 Pro Preview (#50503) 2026-03-04 15:53:26 +00:00
workflows Update PR size check workflow (#51948) 2026-03-19 12:36:00 -04:00
actionlint.yml Reapply "Try namespace mac runners (#47675)" (#47721) (#47727) 2026-01-26 22:02:52 -07:00
cherry-pick-bot.yml Maybe make cherry-pick-bot better 2024-02-28 15:26:30 -07:00
CODEOWNERS.hold Remove Supermaven-related code from Zed (#50537) 2026-03-02 22:18:49 +00:00
FUNDING.yml Add sponsor button to main Zed repo (#46807) 2026-01-14 10:38:51 -06:00
pull_request_template.md Update assign-reviewers workflow for fork PR support (#51876) 2026-03-18 19:09:44 -04:00