Skip to content

fix(dispatch): give pm-dispatch-ci-fix a default-branch default (#2672) - #2736

Merged
dezren39 merged 1 commit into
mainfrom
fix/2672-ci-fix-default-branch
Oct 30, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/2672-ci-fix-default-branch

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Part of #2672

Bug

The pm-dispatch-ci-fix wrapper (added in #2701) forwards all of its inputs to pm-dispatch-task with explicit with: entries — including default-branch: ${{ inputs['default-branch'] }}. But the wrapper's own default-branch input declared no default, unlike pm-dispatch-task's same-named input, which defaults to ${{ github.event.repository.default_branch }}.

In GitHub Actions, an explicitly passed value wins over the receiving action's declared default — even when that value is the empty string. So a caller using the wrapper exactly as intended (a ci-fix job with no with: block at all) sent default-branch: "" into pm-dispatch-task, silently suppressing the task action's own default instead of letting it apply.

That matters because pm-dispatch-task's resolve step only sets is_default_branch=true when the default-branch input is non-empty and equal to the failed run's branch. With the empty string it can never match, so a fresh ci-fix failure on the repo's default branch — the main case this wrapper exists for — was misrouted: it went to pm-dispatch-queue at normal priority instead of pm-dispatch-start at high priority.

Fix

One line: give the wrapper's default-branch input the same default the task action declares, ${{ github.event.repository.default_branch }}, so an unset wrapper input now forwards the real default branch instead of an empty string.

Audit of the other pass-through inputs

Checked every other input the wrapper forwards, against both the wrapper's and pm-dispatch-task's action.yml:

  • Safe as empty (no default in the wrapper, and pm-dispatch-task treats empty as unset):
    • title — for task: ci-fix the task action ignores this input entirely and always uses the conventional ci-fix: <workflow> failing on <branch> title.
    • model — the task action forwards it to the starter/queuer only when non-empty.
    • priority — when empty, the task action's resolve step defaults ci-fix priority to high on the default branch and normal otherwise.
  • Already carry non-empty defaults in the wrapper (confirmed unchanged):
    • repo → ${{ github.repository }}
    • workflow → ${{ github.workflow }}
    • run-id → ${{ github.run_id }}
    • run-url → ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
    • branch → ${{ github.head_ref || github.ref_name }}
    • sha → ${{ github.sha }}
  • pr also already carries a default (${{ github.event.pull_request.number }}); it is empty on non-PR events by design, and the task action substitutes it as an optional placeholder, so it is safe.
  • default-branch was the only pass-through input where an empty string changed behaviour instead of meaning "unset".

README

Checked the pm-dispatch-ci-fix wrapper subsection of pm-stack/dispatch/README.md: it does not state that default-branch has no default (it lists the context inputs that default from the calling run and does not mention default-branch), so no README change was needed or made.

Verification

  • Parsed the edited action.yml with yq: parses cleanly, and inputs."default-branch".default reads back as ${{ github.event.repository.default_branch }}.
  • Diff is exactly one added line in .github/actions/pm-dispatch-ci-fix/action.yml; no other files touched.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 12:46
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a0f6600-6e9e-435b-a449-a8feb8d9b3ba
Commits

Reviewing files that changed from the base of the PR and between 68b1754 and fff2871.

Files selected for processing: 1
  • .github/actions/pm-dispatch-ci-fix/action.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-30T12:47:09.022796Z fff2871 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.

@dezren39
dezren39 merged commit 23fd63f into main Oct 30, 2026
1 check passed
@dezren39
dezren39 deleted the fix/2672-ci-fix-default-branch branch October 30, 2026 12:46
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