Switch the Spell checking workflow from pull_request_target to pull_request #51438

Open
yeelam-gordon opened 3:37pm on October 20, 2026 wants to merge 12 Δ into microsoft/powertoys main from
user/yeelam/FixSpellingPullRequest

Pull Request Overview

  • Opened on October 20, 2026
  • Status Open
  • Commit count 1 with first commit October 20, 2026

Total Delta

12 Total Diff Delta

Open Days

Open 16 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
 
16.0 days Revising work with 0 commits in response to 1 review that left 4 comments

Total time for pull request still awaiting merge (longer than repo's target): 16.0 business days

Author avatar

Switch the Spell checking workflow from pull_request_target to pull_request

Summary of the Pull Request

Switch the Spell checking GitHub Actions workflow from pull_request_target to pull_request so PRs from forks receive a read-only token by default, rather than the workflow's configured repository write permissions.

Impact on PR feedback



  • PRs from forks: Automatic spelling comments and SARIF reports will no longer be available on the PR. Contributors must open the failed spelling check's logs or job summary to find errors and fix guidance. Pushing fixes automatically reruns the check.


  • PRs from repository branches: Automatic PR comments and SARIF uploads are unchanged.

Validation Steps Performed

Not yet tested on GitHub: the repository's spelling workflow is currently manually disabled.

Comments Threads Pending Resolution

ljharb reviewed on October 20, 2026
ljharb left a comment

### 🔵 Needs a closer look

Event and token-permission behavior still needs live GitHub validation, and Dependabot reporting remains unresolved.

1 open issue

- Medium severity [Avoid comment attempts from Dependabot read-only pull request runs](https://github.com/microsoft/PowerToys/pull/51438#discussion_r4325663124) · New

What changed in this PR

Moves spelling checks to `pull_request` events for fork and same-repository contributions, while limiting automatic PR comments to same-repository branches.

**Changes:**
- Replaces `pull_request_target` in the trigger and example comment.
- Disables SARIF for fork PRs.
- Restricts PR reporting to same-repository heads.

| File | Description |
| ---- | ----------- |
| `.github/​workflows/​spelling2.yml` | Updates spelling triggers, SARIF gating, and PR reporting conditions. |

Review effort: Balanced

Resolved Comment Threads

ljharb reviewed on October 20, 2026
ljharb left a comment

### 🔵 Needs a closer look

Event and token-permission behavior still needs live GitHub validation, and Dependabot reporting remains unresolved.

1 open issue

- Medium severity [Avoid comment attempts from Dependabot read-only pull request runs](https://github.com/microsoft/PowerToys/pull/51438#discussion_r4325663124) · New

What changed in this PR

Moves spelling checks to `pull_request` events for fork and same-repository contributions, while limiting automatic PR comments to same-repository branches.

**Changes:**
- Replaces `pull_request_target` in the trigger and example comment.
- Disables SARIF for fork PRs.
- Restricts PR reporting to same-repository heads.

| File | Description |
| ---- | ----------- |
| `.github/​workflows/​spelling2.yml` | Updates spelling triggers, SARIF gating, and PR reporting conditions. |

Review effort: Balanced

.github/workflows/spelling2.yml
Outdated
163
    permissions:
164
      actions: read
165
      pull-requests: write
165 166
    if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
 && github.event.pull_request.head.repo.full_name == github.repository