Skip to content

Update PR size check workflow#51948

Merged
swannysec merged 2 commits intomainfrom
fix/workflow-permissions-and-labels
Mar 19, 2026
Merged

Update PR size check workflow#51948
swannysec merged 2 commits intomainfrom
fix/workflow-permissions-and-labels

Conversation

@swannysec
Copy link
Copy Markdown
Contributor

Context

The PR size check workflow has been failing with 403 Resource not accessible by integration on every run (example). 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

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • N/A

- Fix permissions ceiling that blocked label management and PR comments
- Skip redundant label remove/add when size classification is unchanged
- Add monthly review health report workflow for SOC2 evidence collection
This workflow stays in pr-review where it analyzes zed's public PR data
and files report issues locally.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested a review from a team March 19, 2026 16:17
@swannysec swannysec merged commit 8a467a5 into main Mar 19, 2026
42 checks passed
@swannysec swannysec deleted the fix/workflow-permissions-and-labels branch March 19, 2026 16:36
@swannysec swannysec restored the fix/workflow-permissions-and-labels branch March 19, 2026 16:36
@swannysec swannysec deleted the fix/workflow-permissions-and-labels branch March 19, 2026 16:36
swannysec added a commit that referenced this pull request Mar 19, 2026
## Context

The permissions ceiling bug (fixed in #51948) left two open PRs (#51897,
#50372) with failed `check-size` runs. The Check Runs API requires
GitHub App auth, so we can't post passing checks from the CLI — it needs
to run inside Actions with `checks: write`.

This adds a `workflow_dispatch` workflow that takes comma-separated PR
numbers, computes sizes, applies labels, and posts passing check runs.
Delete after use.

## How to Review

- Single file: `.github/workflows/fix-size-check.yml`
- Uses the same size logic and ignored patterns as `pr-size-check.yml`
- Input is `pr_numbers` (comma-separated integers), accessed via JS API,
not shell interpolation

## 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
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
## 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
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…es#51958)

## Context

The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897,
zed-industries#50372) with failed `check-size` runs. The Check Runs API requires
GitHub App auth, so we can't post passing checks from the CLI — it needs
to run inside Actions with `checks: write`.

This adds a `workflow_dispatch` workflow that takes comma-separated PR
numbers, computes sizes, applies labels, and posts passing check runs.
Delete after use.

## How to Review

- Single file: `.github/workflows/fix-size-check.yml`
- Uses the same size logic and ignored patterns as `pr-size-check.yml`
- Input is `pr_numbers` (comma-separated integers), accessed via JS API,
not shell interpolation

## 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
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
## 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
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…es#51958)

## Context

The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897,
zed-industries#50372) with failed `check-size` runs. The Check Runs API requires
GitHub App auth, so we can't post passing checks from the CLI — it needs
to run inside Actions with `checks: write`.

This adds a `workflow_dispatch` workflow that takes comma-separated PR
numbers, computes sizes, applies labels, and posts passing check runs.
Delete after use.

## How to Review

- Single file: `.github/workflows/fix-size-check.yml`
- Uses the same size logic and ignored patterns as `pr-size-check.yml`
- Input is `pr_numbers` (comma-separated integers), accessed via JS API,
not shell interpolation

## 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
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
## 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
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…es#51958)

## Context

The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897,
zed-industries#50372) with failed `check-size` runs. The Check Runs API requires
GitHub App auth, so we can't post passing checks from the CLI — it needs
to run inside Actions with `checks: write`.

This adds a `workflow_dispatch` workflow that takes comma-separated PR
numbers, computes sizes, applies labels, and posts passing check runs.
Delete after use.

## How to Review

- Single file: `.github/workflows/fix-size-check.yml`
- Uses the same size logic and ignored patterns as `pr-size-check.yml`
- Input is `pr_numbers` (comma-separated integers), accessed via JS API,
not shell interpolation

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants