Create a pull request with proper metadata, milestone, and issue linking
Creates a pull request with proper metadata, milestone assignment, and issue linking.
/plugin marketplace add postsharp/PostSharp.Engineering.AISkills/plugin install eng@postsharp-engineering[issue numbers to close]Create a PR with proper metadata, milestone, and issue linking for Metalama/PostSharp repos.
$ARGUMENTS - Optional issue numbers to close (e.g., 1234 1235)
Commit and push any remaining changes
Check for breaking changes compared to develop/YYYY.N:
breaking label to PR and linked issuesCreate PR targeting develop/YYYY.N (NOT default branch):
gh pr create --base develop/YYYY.N --title "<title>" --body "<body>"
PR body format:
## Summary
- Bullet points describing key changes
## Breaking Changes (if applicable)
- List new interface members or behavioral changes
## Issues Fixed
- #1226 - Brief description
- #1232 - Brief description
NO test plan section - tests are verified through CI.
Assign to milestone - find latest open YYYY.N.B-suffix:
gh api "repos/metalama/Metalama/milestones?state=all&per_page=100" --jq '.[] | "\(.number) \(.title) - \(.state)"' | grep "YYYY.N" | sort -V
# Assign (use milestone NUMBER)
gh api repos/metalama/Metalama/issues/<PR_NUMBER> -X PATCH -f milestone=<NUMBER>
If no open milestone exists, propose creating one.
Assign to current user:
gh api repos/metalama/Metalama/issues/<PR_NUMBER> -X PATCH -f assignees[]="<username>"
Link issues (workaround for non-default base branch):
# Get PR node ID
PR_ID=$(gh api graphql -f query='{ repository(owner: "metalama", name: "Metalama") { pullRequest(number: <PR_NUMBER>) { id } } }' --jq '.data.repository.pullRequest.id')
# Temporarily change base to release branch (GitHub default), then back - links persist!
gh api graphql -f query="mutation { updatePullRequest(input: { pullRequestId: \"$PR_ID\" baseRefName: \"release/YYYY.N\" }) { pullRequest { id } } }"
gh api graphql -f query="mutation { updatePullRequest(input: { pullRequestId: \"$PR_ID\" baseRefName: \"develop/YYYY.N\" }) { pullRequest { id } } }"
Set project status to "In Review":
# Get project item ID
ITEM_ID=$(gh api graphql -f query='{ repository(owner: "metalama", name: "Metalama") { pullRequest(number: <PR_NUMBER>) { projectItems(first: 10) { nodes { id project { title } } } } } }' --jq '.data.repository.pullRequest.projectItems.nodes[] | select(.project.title == "Development") | .id')
# Set status (In review: 4cc61d42)
gh api graphql -f query="mutation { updateProjectV2ItemFieldValue(input: { projectId: \"PVT_kwDOC7gkgc4A030b\" itemId: \"$ITEM_ID\" fieldId: \"PVTSSF_lADOC7gkgc4A030bzgqb1vQ\" value: { singleSelectOptionId: \"4cc61d42\" } }) { projectV2Item { id } } }"
Trigger TeamCity build: Use /tc-build or ask user.
YYYY.N.B-rc/create-prCreate a new branch, commit changes, and submit a pull request with automatic commit splitting