ワンクリックで
github-repo-resolution
Normalize GitHub remotes from git -C cwd and prefer fork parents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Normalize GitHub remotes from git -C cwd and prefer fork parents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
{what this skill teaches agents}
Build real git source, bare remote, and local clone fixtures for CopilotBooster integration tests.
{what this skill teaches agents}
Reusable WinForms pattern for textboxes that accept either a bare GitHub PR/Issue number or a full github.com URL.
Core conventions and patterns for this codebase
Isolate tests for services that write under %LOCALAPPDATA% without touching the real user profile.
| name | github-repo-resolution |
| description | Normalize GitHub remotes from git -C cwd and prefer fork parents |
| domain | csharp-services |
| confidence | medium |
| source | issue-19 |
Use when a service needs the canonical GitHub repo for a Copilot session cwd.
var result = GitService.ResolveGitHubRepo(cwd);
var repo = GitService.TryResolveGitHubRepo(cwd);
git -C <cwd>, never literal .git checks.upstream first, then origin.GitHubRepoResolution.NotAGitRepo when git -C cwd rev-parse --is-inside-work-tree fails.GitHubRepoResolution.NoRemote when neither remote exists.GitHubRepoResolution.NonGitHubRemote when the selected remote exists but host is not github.com.| Form | Result |
|---|---|
https://github.com/owner/repo(.git)? | owner/repo |
git@github.com:owner/repo(.git)? | owner/repo |
ssh://git@github.com/owner/repo(.git)? | owner/repo |
Host comparison is case-insensitive. Owner and repo casing are preserved.
After parsing a GitHub remote, run:
gh repo view owner/repo --json parent --jq .parent.nameWithOwner
Use a 5 second timeout. Fall back to the parsed remote if gh is unavailable, fails, times out, or returns no parent. Tests can set GH_PATH to a fake executable.