Skip to content

ci: fix spelling action failure#922

Merged
ishymko merged 2 commits into1.0-devfrom
ishymko/spelling
Apr 2, 2026
Merged

ci: fix spelling action failure#922
ishymko merged 2 commits into1.0-devfrom
ishymko/spelling

Conversation

@ishymko
Copy link
Copy Markdown
Member

@ishymko ishymko commented Apr 2, 2026

There is code in spelling check which probes branch renaming to make sure that pipeline is set up according to the guide.

It doesn't specify request body and looks for a specific message in the response assuming that token check happens before body validation. Seems like GitHub change behavior and body schema is validated before permissions, so such request fails with a different error now:

curl -s -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.github.com/repos/a2aproject/a2a-python/branches/1.0-dev/rename"

{
  "message": "Invalid request.\n\nFor 'links/0/schema', nil is not an object.",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "422"
}

Providing body gives a proper error:

{
  "message": "Resource not accessible by personal access token",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "403"
}

Trying to update the workflow according to the sample https://raw.githubusercontent.com/check-spelling/spell-check-this/main/.github/workflows/spelling.yml.

Do not merge.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a test.txt file to the root directory. Feedback indicates that this violates the project's directory structure guidelines, which restrict files to the /src, /tests, and /docs directories, and suggests moving the file to the appropriate location.

Comment thread test.txt Outdated
@@ -0,0 +1 @@
Test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The addition of 'test.txt' at the repository root appears to be a mistake or placeholder, as it does not address the 'spelling issue' mentioned in the PR title and deviates from the project's directory structure. If this was intended as a test case, it should be placed in the '/tests' directory following the established naming conventions.

References
  1. The repository style guide (Line 13) defines the key directories as /src, /tests, and /docs. Adding arbitrary files to the root directory is not aligned with this organizational structure. (link)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

@ishymko ishymko changed the title ci: spelling issue ci: fix spelling action failure Apr 2, 2026
@ishymko ishymko marked this pull request as ready for review April 2, 2026 12:10
@ishymko ishymko requested a review from a team as a code owner April 2, 2026 12:10
@ishymko ishymko merged commit 3942c57 into 1.0-dev Apr 2, 2026
19 checks passed
@ishymko ishymko deleted the ishymko/spelling branch April 2, 2026 12:10
ishymko added a commit that referenced this pull request Apr 2, 2026
There is [code in spelling
check](https://github.com/check-spelling/check-spelling/blob/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/unknown-words.sh#L182)
which probes branch renaming to make sure that pipeline is set up
according to the
[guide](https://docs.check-spelling.dev/Feature:-Restricted-Permissions).

It doesn't specify request body and looks for a specific message in the
response assuming that token check happens before body validation. Seems
like GitHub change behavior and body schema is validated before
permissions, so such request fails with a different error now:

```
curl -s -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.github.com/repos/a2aproject/a2a-python/branches/1.0-dev/rename"

{
  "message": "Invalid request.\n\nFor 'links/0/schema', nil is not an object.",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "422"
}
```

Providing body gives a proper error:

```json
{
  "message": "Resource not accessible by personal access token",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "403"
}
```

Trying to update the workflow according to the sample
https://raw.githubusercontent.com/check-spelling/spell-check-this/main/.github/workflows/spelling.yml.
ishymko added a commit that referenced this pull request Apr 2, 2026
There is [code in spelling
check](https://github.com/check-spelling/check-spelling/blob/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/unknown-words.sh#L182)
which probes branch renaming to make sure that pipeline is set up
according to the
[guide](https://docs.check-spelling.dev/Feature:-Restricted-Permissions).

It doesn't specify request body and looks for a specific message in the
response assuming that token check happens before body validation. Seems
like GitHub change behavior and body schema is validated before
permissions, so such request fails with a different error now:

```
curl -s -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.github.com/repos/a2aproject/a2a-python/branches/1.0-dev/rename"

{
  "message": "Invalid request.\n\nFor 'links/0/schema', nil is not an object.",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "422"
}
```

Providing body gives a proper error:

```json
{
  "message": "Resource not accessible by personal access token",
  "documentation_url": "https://docs.github.com/rest/branches/branches#rename-a-branch",
  "status": "403"
}
```

Trying to update the workflow according to the sample
https://raw.githubusercontent.com/check-spelling/spell-check-this/main/.github/workflows/spelling.yml.
ishymko added a commit that referenced this pull request Apr 2, 2026
See #922, `pull_request_target` apparently requires pushing to `main`.
@ishymko
Copy link
Copy Markdown
Member Author

ishymko commented Apr 2, 2026

Didn't help, reported in check-spelling/check-spelling#103.

ishymko added a commit that referenced this pull request Apr 3, 2026
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