zed/.github/workflows
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
..
add_commented_closed_issue_to_project.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
after_release.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
assign-reviewers.yml Fix pip hash verification in assign-reviewers workflow (#51881) 2026-03-18 19:45:19 -04:00
autofix_pr.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
background_agent_mvp.yml Pause scheduled background agent workflow (#50009) 2026-02-24 11:49:03 -06:00
bump_collab_staging.yml ci: Switch from ubuntu-latest to namespace (2) (#36702) 2025-08-21 13:21:37 -04:00
bump_patch_version.yml extension_rollout: Add incremental rollout (#51264) 2026-03-11 11:53:22 +01:00
catch_blank_issues.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
cherry_pick.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
comment_on_potential_duplicate_issues.yml Post comments on duplicate bug reports (#49482) 2026-02-18 17:15:15 +00:00
community_champion_auto_labeler.yml Update community champions (#48818) 2026-02-09 21:22:56 +00:00
community_close_stale_issues.yml Tweak stalebot (words, number of days) (#48603) 2026-02-13 08:53:31 +00:00
community_update_all_top_ranking_issues.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
community_update_weekly_top_ranking_issues.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
compare_perf.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
congrats.yml ci: Move more jobs to Namespace runners (#48228) 2026-02-05 12:06:01 +00:00
danger.yml ci: Define default shell for all workflows (#47883) 2026-01-28 14:07:06 -07:00
deploy_cloudflare.yml docs: Add consent banner (#50302) 2026-03-04 15:38:31 +01:00
deploy_collab.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
docs_suggestions.yml Align docs_suggestions.yml with repo CI conventions (#49999) 2026-02-24 10:59:54 -06:00
extension_auto_bump.yml extension_ci: Switch back to upstream action (#51829) 2026-03-18 11:54:16 +01:00
extension_bump.yml extension_ci: Switch back to upstream action (#51829) 2026-03-18 11:54:16 +01:00
extension_tests.yml extension_ci: Add infrastructure for this repository (#51493) 2026-03-13 18:17:29 +01:00
extension_workflow_rollout.yml extension_rollout: Fix workflow file path (#51273) 2026-03-11 11:15:44 +00:00
good_first_issue_notifier.yml ci: Move more jobs to Namespace runners (#48228) 2026-02-05 12:06:01 +00:00
hotfix-review-monitor.yml Use Search API for hotfix monitor to avoid job cancellation (#51880) 2026-03-18 19:32:38 -04:00
pr-size-check.yml Update PR size check workflow (#51948) 2026-03-19 12:36:00 -04:00
pr_labeler.yml Add two guild members to github action (#51914) 2026-03-19 09:58:37 +00:00
publish_extension_cli.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
randomized_tests.yml ci: Switch to Namespace (#35835) 2025-08-07 23:16:25 +00:00
release.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
release_nightly.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
run_agent_evals.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
run_bundling.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
run_cron_unit_evals.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
run_tests.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
run_unit_evals.yml livekit: Use our build of libwebrtc.a (#51433) 2026-03-16 10:47:36 +01:00
slack_notify_first_responders.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00
stale-pr-reminder.yml Update assign-reviewers workflow for fork PR support (#51876) 2026-03-18 19:09:44 -04:00
track_duplicate_bot_effectiveness.yml Add duplicate bot effectiveness tracking (w/github project) (#49879) 2026-02-23 13:22:29 +00:00
update_duplicate_magnets.yml ci: Clean up some of our workflows (#50499) 2026-03-04 22:27:54 +00:00