Skip to content

Fetch pull request commits for incremental spellcheck - #10380

Open
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:codex/spellcheck-pr-objects
Open

mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:codex/spellcheck-pr-objects

Conversation

@mcagnion

@mcagnion mcagnion commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

The shallow checkout used by the spellcheck workflow can omit the pull request's head commit. When the incremental diff cannot read that object, spellcheck falls back to scanning the whole repository and reports spelling errors in unchanged files.

Fetch the event's base and head commits at depth 1 before running spellcheck. This supplies the objects needed for the diff without fetching the full repository history. Other workflow events are unchanged.

Steps taken to verify a working solution:

  • Reproduced the missing-head-object failure in a shallow clone.
  • Fetched the two event commits and verified that the same diff command returned only the changed files.
  • Validated the workflow with actionlint.

Provide the event base and head objects required by the incremental diff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant