Skip to main content

radius-create-pr

Automates GitHub pull request creation from the current branch

Informations de source

Dépôt
radius-project/radius
Dernière activité de la source
21 octobre 2026 à 19:27
Langue détectée de SKILL.md
anglais
Étoiles
1 670
Forks
140

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
radius-create-pr
description
Automates GitHub pull request creation from the current branch
disable-model-invocation
true
# Create GitHub Pull Request Create a pull request from the current branch following the steps below. ## Determining the Default Branch When working with forks, the default branch must come from the correct remote: - If `upstream` exists in `git remote -v`: run `git remote show upstream` and parse the output to find the `HEAD branch` - Otherwise: run `git remote show origin` and parse the output to find the `HEAD branch` > [!TIP] > On Linux or macOS for precise output parsing, consider using: `git remote show <your-remote-name> | grep 'HEAD branch'` > On Windows with PowerShell, you can use: `git remote show <your-remote-name> | Select-String 'HEAD branch'` ## Steps ### Step 1: Validate Branch State Stop and inform the user if any of these conditions exist: - Current branch has no remote tracking branch (`git rev-parse --abbrev-ref --symbolic-full-name "@{u}"`) - Uncommitted changes exist (`git status --porcelain`) - Unpushed commits exist (`git rev-list --count "@{u}..HEAD"` returns > 0) ### Step 2: Load PR Template Check for a PR template at these locations (in order): - `.github/PULL_REQUEST_TEMPLATE.md` - `.github/pull_request_template.md` - `docs/PULL_REQUEST_TEMPLATE.md` - `PULL_REQUEST_TEMPLATE.md` Use the first template found to structure the PR description. ### Step 3: Generate PR Content Analyze the changes using `git diff` and `git log` against the default branch. **PR Title Requirements:** - Maximum 80 characters - Use `<type>[optional scope][!]: <description>` with a lowercase type - Read the [PR title guide](../../../docs/contributing/contributing-pull-requests/README.md#3-use-a-conventional-commit-pull-request-title) and use its allowed types - Use noun phrases in the description, for example `feat(api): authentication improvements` **PR Description:** - Follow the PR template structure if one exists - Preserve checkboxes from the template (do not convert to bullets) - If no template: summarize changes, list modified files, include relevant commit context ### Step 4: Create the Pull Request Create the PR using the GitHub MCP tool, falling back to `gh pr create` if unavailable. - **head**: current branch - **base**: default branch (from Step 1) ### Step 5: Report Result Display the PR URL: ```text ✅ Pull request created successfully! 🔗 URL: [PR_URL] ``` ## Error Handling Stop immediately on any failure with a clear error message. Common errors: - Branch not pushed to remote - Uncommitted or unpushed changes - PR already exists for this branch - Insufficient GitHub permissions
Voir sur GitHub