Skip to content

ci(formal): skip informational PR comment on forked PRs#17497

Closed
napetrov wants to merge 3 commits intoopenclaw:mainfrom
napetrov:napetrov/fix-formal-conformance-fork-comment
Closed

ci(formal): skip informational PR comment on forked PRs#17497
napetrov wants to merge 3 commits intoopenclaw:mainfrom
napetrov:napetrov/fix-formal-conformance-fork-comment

Conversation

@napetrov
Copy link
Contributor

@napetrov napetrov commented Feb 15, 2026

Summary

  • guard the Comment on PR (informational) step in .github/workflows/formal-conformance.yml
  • run the comment step only when github.event.pull_request.head.repo.full_name == github.repository

Why

Fork PRs often have restricted token permissions, so posting PR comments from workflow can fail with:

  • Resource not accessible by integration (HTTP 403)

This currently marks formal_conformance as failed even though the check is informational.

Effect

  • same drift detection + artifact upload behavior
  • no failing comment-post step on fork PRs
  • preserves comment behavior for same-repo PRs

Related context: #16761

Greptile Summary

Adds a fork-guard to the "Comment on PR (informational)" step in the formal conformance workflow. The step now only posts a PR comment when the PR originates from the same repository, preventing 403 errors (Resource not accessible by integration) on fork PRs where the GITHUB_TOKEN lacks pull-requests: write scope.

  • Appends && github.event.pull_request.head.repo.full_name == github.repository to the existing if condition on line 110
  • Drift detection, model checks, artifact upload, and the summary step remain unchanged
  • Uses the standard GitHub Actions idiom for fork detection

Confidence Score: 5/5

  • This PR is safe to merge — it adds a standard, well-understood fork-guard condition to a single CI step.
  • The change is a one-line addition of a standard GitHub Actions fork-detection condition. It only affects when a PR comment is posted, with no impact on the actual conformance checks, artifact uploads, or other workflow behavior. The pattern is idiomatic and widely used in open-source GitHub Actions workflows.
  • No files require special attention.

Last reviewed commit: 8eb4c7b

(4/5) You can add custom instructions or style guidelines for the agent here!

AI Assistance & Contributing Transparency

  • AI-assisted: yes (Codex/Claude)
  • Testing level: lightly tested (targeted checks + CI)
  • Prompts/session logs: Session logs available on request
  • I understand what this code does and can maintain it

@napetrov napetrov closed this Feb 16, 2026
@openclaw-barnacle openclaw-barnacle bot added the agents Agent runtime and tooling label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant