@@ -26,8 +26,11 @@ $ARGUMENTS
2626
27271 . ** Detect repository mode** :
2828 - Run ` git remote -v ` to check configured remotes.
29- - ** If ` upstream ` remote exists** : Fork mode - use upstream owner/repo for all GitHub operations
30- - ** If only ` origin ` remote exists** : Origin mode - use origin owner/repo for all GitHub operations
29+ - ** If ` upstream ` remote exists** : Fork mode
30+ - Use ` upstream ` owner/repo for all GitHub operations (PRs, Issues, labels)
31+ - Use ` origin ` for all git operations (push, fetch)
32+ - ** If only ` origin ` remote exists** : Origin mode
33+ - Use ` origin ` owner/repo for all operations (both git push and GitHub operations)
3134 - Parse the URLs to extract owner and repo name: ` https://github.com/<owner>/<repository>.git ` .
3235 - If in doubt, ask the user to clarify which repository to target.
3336
@@ -48,11 +51,11 @@ $ARGUMENTS
48513 . ** Get current branch information** :
4952 - Determine the current branch name
5053 - Verify there are changes to commit (if uncommitted changes exist, stage and commit them first)
51- - Push the branch to remote if not already pushed.
54+ - Push the branch to ` origin ` remote if not already pushed (always push to origin, even in fork mode) .
5255
53564 . ** Retrieve linked issue information** (if available):
5457 - Attempt to find the GitHub issue number associated with the current branch
55- - If found, retrieve the issue title from the target repository
58+ - If found, retrieve the issue title from the ** target repository** (upstream in fork mode, origin otherwise)
5659 - Use the issue title as the PR title (with appropriate icon prefix)
5760 - If no issue is found, ask the user to provide one of the following:
5861 - the number of the issue to link to the PR
@@ -80,28 +83,29 @@ $ARGUMENTS
8083 - Avoid implementation details unless necessary for understanding
8184
82857 . ** Create or update the pull request** :
83- - ** Check if PR already exists** for this branch in the target repository
86+ - ** Check if PR already exists** for this branch in the ** target repository** (upstream in fork mode, origin otherwise)
8487 - ** If PR exists** : Update the title, description, and labels
85- - ** If PR does not exist** : Create a new PR
86- - Set PR to target the default branch (main/master)
88+ - ** If PR does not exist** : Create a new PR from your fork's branch to the target repository's default branch
89+ - In fork mode, the PR will be from ` <fork-owner>:<branch> ` to ` <upstream-owner>:<default-branch> `
90+ - Set PR to target the default branch (main/master) of the target repository
8791 - Open as a ** draft PR** (or keep as draft if updating)
88- - ** Use GitHub MCP tools** to perform these operations:
92+ - ** Use GitHub MCP tools** to perform these operations in the ** target repository ** :
8993 ```
90- # Create PR (if not exists)
94+ # Create PR (if not exists) - owner/repo should be target repository
9195 mcp_github_github_create_pull_request
9296
93- # Update PR (if exists)
97+ # Update PR (if exists) - owner/repo should be target repository
9498 mcp_github_github_update_pull_request
9599
96- # Add labels to PR
100+ # Add labels to PR - owner/repo should be target repository
97101 mcp_github_github_add_labels_to_issue (PRs are issues in GitHub API)
98102 ```
99103
1001048. **Apply labels to the PR**:
101105 - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs)
102106 - For Fix type, add both `Fix` and `Patch` labels
103107 - If currently in a feature workflow phase (e.g., Planning, Implementation), also apply that phase label
104- - Use GitHub MCP to add labels in the target repository
108+ - Use GitHub MCP to add labels in the ** target repository** (upstream in fork mode, origin otherwise)
105109
1061109. **Confirm completion**:
107111 - Display the PR URL to the user
@@ -117,6 +121,9 @@ $ARGUMENTS
117121- `/PR Patch` - Create a PR for small improvements
118122
119123**Notes**:
124+ - Changes are always pushed to `origin` remote
125+ - In fork mode, PRs and Issue operations are performed on the `upstream` repository
126+ - In origin mode, all operations use the `origin` repository
120127- This command commits and pushes changes if there are uncommitted changes
121128- The PR is always created as a draft to allow for review before marking as ready
122129- Labels can be manually adjusted after PR creation if needed
0 commit comments