Skip to content

feat(marius-mode): resolve PR or MR per forge - #9

Merged
tacheshun merged 1 commit into
mainfrom
feat/forge-mr
Sep 30, 2026
Merged

tacheshun merged 1 commit into
mainfrom
feat/forge-mr

Conversation

@tacheshun

Copy link
Copy Markdown
Owner

Why

Opening a PR assumed GitHub. On GitLab the playbook named the wrong CLI and the wrong noun. It now resolves the forge from the repository and uses that forge's noun (PR or MR) and CLI (origin, gh, or glab).

Scope

  • New skills/marius-mode/references/forge.md: detection order (Origin, GitHub, GitLab, else ask), noun table, and create, retarget, mark-ready, and view commands per forge.
  • playbooks/opening-a-pr.md: Forge, Size and stacks, and Readiness link the reference instead of naming gh. The squash-commit rule now covers merge commits too.
  • playbooks/multi-phase-plan.md: the PR mechanics checklist points at the reference by <skills>/ path, since the skeleton is copied out of the repo.
  • Out of scope: babysit.md, shipping.md, autopilot-stack.md, watch-pr, and worktree-audit.sh still assume GitHub. A follow-up PR covers them.

Blast Radius

Only agents that open a PR through marius-mode. GitHub and Origin behavior is unchanged. An unrecognized remote now asks the user instead of defaulting to gh.

Verification

  • node scripts/check.mjs: ok (45 skills).
  • node --test scripts/*.test.mjs: 14 pass, 0 fail.
  • glab flags checked against the GitLab CLI docs for mr create and mr update. Not run live, since glab is not installed here.

🤖 Generated with Claude Code

Opening a PR detects Origin, GitHub, or GitLab from the repository and
uses that forge's noun and CLI. The forge rules move into
references/forge.md so playbooks link one source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 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-09-30T14:59:17.749368Z 35d1cc1 PR opened
🔒 Security Review ✅ Completed 2026-09-30T15:10:15.445375Z 35d1cc1 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: 35d1cc1e2c

ℹ️ 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".

Check these in order and stop at the first match.

1. **Origin.** `command -v origin` succeeds and Origin can resolve the repository.
2. **GitHub.** The host of `git remote get-url origin` is `github.com`, or `gh repo view` succeeds for a GitHub Enterprise host.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Check the origin host before probing GitHub

When a GitLab-origin checkout also has an authenticated GitHub remote, such as a mirror, this step runs before the explicit GitLab check and gh repo view can succeed against that secondary remote, causing the resolver to select GitHub and open a PR in the mirror instead of an MR at the origin. I confirmed with gh 2.96.0 that a temporary repository with a GitLab origin and github.com/cli/cli as mirror made gh repo view query cli/cli; its help describes the no-argument form as displaying the repository for the current directory, not specifically origin. Classify the known origin host before using the generic CLI probe, or bind the probe to that host.

Useful? React with 👍 / 👎.

@tacheshun tacheshun self-assigned this Sep 30, 2026
@tacheshun
tacheshun merged commit 3b57f8e into main Sep 30, 2026
1 check passed
@tacheshun
tacheshun deleted the feat/forge-mr branch September 30, 2026 15:04
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