fix: add platform detection for PR/MR creation (issue #1609)#1728
Open
ElizioMartins wants to merge 1 commit into
Open
fix: add platform detection for PR/MR creation (issue #1609)#1728ElizioMartins wants to merge 1 commit into
ElizioMartins wants to merge 1 commit into
Conversation
- Detect hosting platform from git remote URL before creating PR/MR - Use 'gh pr create' for GitHub repos - Use 'glab mr create' for GitLab repos - Fall back to manual URL for unknown platforms - Includes issue-closing keywords template (Closes #xxx) Fixes the bug where 'gh pr create' was hardcoded and failed on GitLab/Bitbucket/self-hosted repos.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is submitting this PR?
What problem are you trying to solve?
Issue #1609: The
finishing-a-development-branchskill hardcodedgh pr createfor Option 2 (Push and Create PR) without first checking whether the repo is actually hosted on GitHub. On any other platform (GitLab, Bitbucket, self-hosted),ghfails with a confusing error and no PR/MR is created.What does this PR change?
Adds platform detection before creating PR/MR:
git remote get-url origingh pr createglab mr createAlso includes the issue-closing keywords template (
Closes #<issue-number>) in both GitHub and GitLab templates.Is this change appropriate for the core library?
Yes - this affects all users creating PRs/MRs via the skill, regardless of project domain or Git hosting platform.
What alternatives did you consider?
Does this PR contain multiple unrelated changes?
No - single cohesive change adding platform detection to PR/MR creation.
Existing PRs
Environment tested
Evaluation
gh pr createwithout detecting platform (breaks on GitLab) #1609"gh pr createhardcoded, failed on non-GitHub; After: detects platform, uses correct toolRigor
Human review