Skip to content

feat: build a pull_request payload from the repository when no event file is given - #4

Merged
simota merged 2 commits into
mainfrom
feat/pull-request-default-event
Oct 20, 2026
Merged

simota merged 2 commits into
mainfrom
feat/pull-request-default-event

Conversation

@simota

@simota simota commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

Without -e, pull_request and pull_request_target runs got an empty event payload, so github.base_ref and github.head_ref were empty. A workflow step such as golangci-lint run --new-from-merge-base=origin/${{ github.base_ref }} then received origin/, could not compute the diff, and reported every existing issue.

Like the existing merge_group payload, runthrough now builds a PR from the current branch (head.ref/head.sha) into the default branch (base.ref; --defaultbranch overrides it). base.sha is <remote>/<default> unless that is HEAD itself. The payload has no action, so types filters still pass.

Behavior change

on.pull_request.paths / paths-ignore used to always pass without -e. They are now checked against <remote>/<default>...HEAD (committed changes only), as on GitHub. For pull_request_target, github.ref/sha now point at the base branch, as on GitHub.

Tests

  • make check CARGO_FLAGS=--offline (fmt, clippy, unit + e2e) passes.
  • failing_workflow_runs_failure_steps_and_skips_dependents asserts base_ref / head_ref with --defaultbranch trunk.

…file is given

Without -e, pull_request and pull_request_target runs had an empty payload,
so github.base_ref and head_ref were empty. Build a PR from the current
branch into the default branch (--defaultbranch overrides it), with
base.sha from <remote>/<default> unless it is HEAD.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T04:51:14.250128Z 6caf0e9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6caf0e916f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/context.rs Outdated
…ayload's base.sha

Without <remote>/<default>, pull_request_target pointed github.ref at the
base branch but left github.sha at HEAD, and path filters passed unchecked.
@simota
simota merged commit c24e80b into main Oct 20, 2026
2 checks passed
@simota
simota deleted the feat/pull-request-default-event branch October 20, 2026 04:56
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