# Update PR size check workflow \(\#51948\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8a467a59588249b94ec8ed44582be784fff4e05b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8a467a59588249b94ec8ed44582be784fff4e05b

Requested commit: 8a467a59588249b94ec8ed44582be784fff4e05b

Commit: 8a467a59588249b94ec8ed44582be784fff4e05b

Tree: 3c174e8905ee5d85b33ecff7bc5e543caef3b8f7

Author: John D\. Swanson

Committer: GitHub

## Message

```
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
```

## Parents

- [6cbb3b96357e4c2874c8ca0afa49627df872aa4f](https://git.cafe/gitcafe/zed/commit/6cbb3b96357e4c2874c8ca0afa49627df872aa4f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8a467a59588249b94ec8ed44582be784fff4e05b?format=markdown)
