Skip to content

fix(label): tolerate forbidden fork label writes - #264

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-type-label-fork-permissions
Jun 2, 2026
Merged

fix(label): tolerate forbidden fork label writes#264
JSONbored merged 1 commit into
mainfrom
codex/fix-type-label-fork-permissions

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • prevent Type Label from failing when GitHub refuses a fork PR label write with Resource not accessible by integration
  • keep unexpected label API failures fatal
  • add regression coverage for the fork-token 403 and normal write failures

What changed

  • scripts/github-type-label.mjs now treats the specific GitHub 403 integration-denial response as a non-failing skip
  • test/unit/github-type-label.test.ts covers the PR feat(mcp): add multi-account profile support #263-style 403 and verifies unrelated write errors still throw

Why

  • fork PRs can produce a red Apply type label check even when the classifier is correct and the workflow is otherwise safe
  • entrius/gittensor avoids write-on-fork risk by splitting same-repo and fork PR jobs; e35ventura/taopedia-articles avoids PR label mutation and keeps PR workflows read-only, so this patch keeps Gittensory's deterministic labeler but makes the denied write path non-disruptive

Validation

  • node --check scripts/github-type-label.mjs
  • npm run test -- test/unit/github-type-label.test.ts
  • npm run actionlint
  • npm run test:ci

Notes

  • this does not add a PAT or app token to force labels onto fork PRs
  • if GitHub refuses the write, the workflow reports a clean skip instead of a failed check

Treat GitHub's fork-token label write denial as a non-failing skip so type-label automation does not create red checks on contributor PRs.

Keep other label API errors fatal and add regression coverage for both the 403 integration denial and normal write failures.

Validation:
- node --check scripts/github-type-label.mjs
- npm run test -- test/unit/github-type-label.test.ts
- npm run actionlint
- npm run test:ci
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui c932025 Commit Preview URL

Branch Preview URL
Jun 02 2026, 07:16 AM

@JSONbored JSONbored self-assigned this Jun 2, 2026
@JSONbored
JSONbored merged commit 1423f7f into main Jun 2, 2026
7 of 8 checks passed
@JSONbored
JSONbored deleted the codex/fix-type-label-fork-permissions branch June 2, 2026 07:23
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 2, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant