Skip to content

fix(ci): skip pull request automation without write credentials - #72

Merged
marandaneto merged 2 commits into
mainfrom
fix/changeset-hygiene-fork-permissions
Aug 24, 2026
Merged

fix(ci): skip pull request automation without write credentials#72
marandaneto merged 2 commits into
mainfrom
fix/changeset-hygiene-fork-permissions

Conversation

@marandaneto

@marandaneto marandaneto commented Aug 24, 2026

Copy link
Copy Markdown
Member

Problem

Some pull request workflows try to write comments or update project boards. GitHub does not provide the required write token or GitHub App credentials to fork and Dependabot pull requests.

The changeset hygiene workflow completes its setup and report generation before its comment request fails with a 403 response. Example failure: https://github.com/PostHog/posthog-js/actions/runs/32717251565/job/97401261439?pr=4614

The feature flags project-board workflow already skips some restricted runs. Its guard only checks fork status for pull_request, not pull_request_review. It also checks github.actor for Dependabot, but that value identifies the reviewer during review events.

Changes

  • Skip changeset hygiene for fork and Dependabot pull requests before a runner is provisioned.
  • Skip feature flags project-board updates for fork and Dependabot pull requests on both pull request and review events.
  • Continue running project-board updates for manual dispatches and same-repository pull requests.

GitHub treats skipped jobs as successful.

Testing

  • actionlint .github/workflows/changeset-hygiene.yml .github/workflows/flags-project-board.yml
  • Verified the project-board condition for manual, same-repository, fork, and Dependabot events.
  • git diff --check origin/main...HEAD

@marandaneto
marandaneto requested a review from a team August 24, 2026 10:49
@marandaneto
marandaneto marked this pull request as ready for review August 24, 2026 10:49
@marandaneto
marandaneto requested a review from a team as a code owner August 24, 2026 10:49
@marandaneto marandaneto changed the title fix(ci): skip changeset hygiene for read-only pull request tokens fix(ci): skip pull request automation without write credentials Aug 24, 2026
@marandaneto
marandaneto enabled auto-merge (squash) August 24, 2026 10:53
@marandaneto
marandaneto merged commit 5ba5d24 into main Aug 24, 2026
14 checks passed
@marandaneto
marandaneto deleted the fix/changeset-hygiene-fork-permissions branch August 24, 2026 14:38
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.

3 participants