Skip to content

feat(git): detect fork owner from origin URL for PR creation#43

Merged
cblecker merged 1 commit into
mainfrom
feat/git-fork-owner-detection
Jun 5, 2026
Merged

feat(git): detect fork owner from origin URL for PR creation#43
cblecker merged 1 commit into
mainfrom
feat/git-fork-owner-detection

Conversation

@cblecker

@cblecker cblecker commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add detect_fork_owner() to extract the actual fork owner from the origin remote URL, replacing the hardcoded "your-username" placeholder when generating PR creation instructions
  • Add github as a plugin dependency in plugin.json
  • Clean up MCP tool references to use plain English names (create_pull_request tool instead of the full MCP function name)
  • Bump git plugin version to 1.4.0
  • Add agent-eval-harness@opendatahub-skills marketplace entry to settings

Test plan

  • In a forked repo, confirm the SessionStart hook output uses the correct fork owner name in the head parameter guidance
  • In a non-fork repo, confirm the fallback "your-username" placeholder does not appear in PR instructions
  • Validate the git plugin: claude plugin validate ./git

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated plugin configurations and bumped Git tool version to 1.4.0
  • Improvements

    • Enhanced pull request creation workflow with GitHub integration
    • Improved fork owner detection for automated pull request submissions
  • Documentation

    • Updated guides for pull request creation workflows

Add detect_fork_owner() to extract the actual fork owner from the
origin remote URL, replacing the hardcoded "your-username" placeholder.
Also adds github as a plugin dependency, cleans up MCP tool references
to use plain English names, and bumps the plugin version to 1.4.0.

Assisted-by: Claude:claude-sonnet-4-6[1m]
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e62037c9-7ef5-45d1-85f0-45ac5fe681fa

📥 Commits

Reviewing files that changed from the base of the PR and between 8806992 and decfbee.

📒 Files selected for processing (4)
  • .claude/settings.json
  • git/.claude-plugin/plugin.json
  • git/CLAUDE.md
  • git/scripts/git-instructions.sh

📝 Walkthrough

Walkthrough

PR adds the OpenDataHub Skills plugin to the plugin registry and updates the Git plugin to declare a GitHub MCP dependency, implement dynamic fork owner detection from the origin remote URL, and modernize pull request creation to use the GitHub MCP create_pull_request tool with computed fork owner values.

Changes

OpenDataHub Skills Plugin Registration

Layer / File(s) Summary
Plugin configuration and marketplace registration
.claude/settings.json
Enabled agent-eval-harness@opendatahub-skills plugin and registered opendatahub-skills marketplace with GitHub source repository opendatahub-io/skills-registry.

Git Plugin GitHub MCP Integration

Layer / File(s) Summary
Plugin metadata and GitHub dependency
git/.claude-plugin/plugin.json
Version incremented to 1.4.0 and dependencies field added declaring ["github"].
Fork owner detection
git/scripts/git-instructions.sh
Added detect_fork_owner() helper to extract fork owner from origin remote URL with your-username fallback; introduced FORK_OWNER variable populated by this helper.
Documentation and workflow updates for GitHub MCP
git/CLAUDE.md, git/scripts/git-instructions.sh
Updated documentation and generated instructions to reference GitHub MCP create_pull_request tool and use ${FORK_OWNER}:branch-name for PR head instead of hardcoded your-username:branch-name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A fork detected, owner known,
GitHub's tools in scripts have grown,
Skills from OpenDataHub bloom,
Pull requests flee the hardcoded gloom!
With dependencies clear, the plugins align,
All manner of creation now fine! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main objective of detecting fork owner from origin URL for PR creation, which is the primary feature addition in this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/git-fork-owner-detection

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 and usage tips.

@cblecker cblecker merged commit 053470f into main Jun 5, 2026
8 checks passed
@cblecker cblecker deleted the feat/git-fork-owner-detection branch June 5, 2026 04: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