Create a pull request with Linear issue integration and CI/CD monitoring.
Creates a pull request with Linear issue integration and monitors CI/CD status.
/plugin marketplace add wuyuxiangX/yux-claude-hub/plugin install yux-linear-workflow@yux-claude-hubCreate a pull request with Linear issue integration and CI/CD monitoring.
Usage: /yux-linear-pr [additional description]
Additional PR description from: $ARGUMENTS (optional)
.claude/linear-config.jsonLinear configuration not found. Please run `/yux-linear-start` first to set up team/project.
LINEAR_TEAM and LINEAR_PROJECT for API callsVerify current branch:
git branch --show-current
main or masterLIN-123)Check for commits:
git log origin/main..HEAD --oneline
Verify gh CLI:
gh auth status
Get current branch name:
BRANCH=$(git branch --show-current)
Extract Linear issue ID:
LIN-\d+feat/LIN-456-user-auth → LIN-456Fetch issue details from Linear:
mcp__linear__get_issue(id: "LIN-456")
List all commits:
git log origin/main..HEAD --pretty=format:"%s" --reverse
Generate changelog:
Create PR title:
[LIN-456] <Issue Title>[LIN-456] Implement user authenticationCreate PR body:
## Summary
<Issue description from Linear>
<Additional description from user if provided>
## Linear Issue
Closes LIN-456
## Changes
- feat(auth): add login component
- feat(auth): add JWT token handling
- test(auth): add authentication tests
## Test Plan
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
---
Generated with Linear Workflow Plugin
Push latest changes:
git push origin HEAD
Create PR via gh CLI:
gh pr create \
--title "[LIN-456] <title>" \
--body "<generated body>" \
--base main
Get PR number and URL:
gh pr view --json number,url
Update status to "In Review":
mcp__linear__update_issue(
id: "LIN-456",
state: "In Review"
)
Add PR link as comment:
mcp__linear__create_comment(
issueId: "LIN-456",
body: "Pull Request created: <PR URL>\n\nChanges:\n<commit list>"
)
Trigger CI monitoring (invoke yux-ci-monitor skill):
Initial status check:
gh pr checks <pr-number> --json name,state,conclusion
Display initial status:
=== CI Status ===
├── ○ lint (pending)
├── ○ build (pending)
├── ○ test (pending)
└── ○ deploy-preview (pending)
Monitoring CI... (will update every 15 seconds)
Poll for updates until all checks complete or timeout (30 min)
On completion:
Success output:
=== Pull Request Created ===
PR: #78 - [LIN-456] Implement user authentication
URL: https://github.com/org/repo/pull/78
Branch: feat/LIN-456-user-auth → main
Linear: LIN-456 status updated to "In Review"
CI Status: Monitoring...
├── ✓ lint (passed)
├── ✓ build (passed)
├── ○ test (running)
└── ○ deploy-preview (pending)
---
📋 Next Steps:
\`\`\`
/yux-linear-status
\`\`\`
Monitor CI status
\`\`\`
/yux-linear-merge
\`\`\`
Merge the PR when CI passes
User: /yux-linear-pr
Claude: Creating pull request...
Current branch: feat/LIN-456-user-auth
Issue: LIN-456 - Implement user authentication
Commits to include:
- feat(auth): add login component
- feat(auth): add JWT token handling
- test(auth): add authentication tests
Creating PR...
✓ PR #78 created: https://github.com/org/repo/pull/78
✓ Linear LIN-456 updated to "In Review"
=== CI Monitoring ===
├── ○ lint (queued)
├── ○ build (queued)
├── ○ test (queued)
└── ○ deploy-preview (queued)
Waiting for CI to start...