Pr
Create a pull request with full review, testing, deployment, and verification cycle.
Claude CodeGeneric
# Pull Request Workflow
Create a pull request with full review, testing, deployment, and verification cycle.
## Steps
### 1. Run Tests
- Run unit tests to ensure no regressions
- Run E2E tests for affected user flows
- Fix any failing tests before proceeding
```bash
# Run unit tests
npm run test:unit
# Run E2E tests (requires build)
npm run test:e2e
2. Commit Changes
- Run
git statusto see all changes - Run
git diffto review staged and unstaged changes - Stage relevant files with
git add - Create a descriptive commit with the standard format
# Review changes
git status
git diff --stat
git log --oneline -5
# Stage and commit
git add <files>
git commit -m "$(cat <<'EOF'
feat: description of changes
Details here.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
2. Push to Remote
- Create a new branch if needed
- Push with upstream tracking
# Create branch and push
git checkout -b feat/feature-name
git push -u origin feat/feature-name
3. Create Pull Request
- Use
gh pr createwith a clear title and body - Include a summary section with bullet points
- Include a test plan section
gh pr create --title "feat: description" --body "$(cat <<'EOF'
## Summary
- Change 1
- Change 2
## Test plan
- [ ] Test case 1
- [ ] Test case 2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
4. Wait for CI Checks
- After PR is created, wait for all CI checks to pass
- Fix any failing checks before requesting review
# Watch CI checks status (poll until complete)
gh pr checks <pr-number> --watch
# Or check status manually
gh pr checks <pr-number>
# If checks fail, view the logs
gh run list --branch <branch-name>
gh run view <run-id> --log-failed
5. Request Copilot Review
- After CI checks pass, request review from @copilot
gh pr edit <pr-number> --add-reviewer copilot
6. Wait for Review
- Poll for review completion and fetch comments
# View PR details and comments
gh pr view <pr-number> --comments
# Check review status via API
gh api repos/<owner>/<repo>/pulls/<pr-number>/reviews
gh api repos/<owner>/<repo>/pulls/<pr-number>/comments
# Check merge readiness
gh pr view <pr-number> --json mergeable,mergeStateStatus,reviewDecision,reviews,comments
7. Address Review Feedback
For each issue found:
- Read the comment and understand the concern
- Make the necessary code changes
- Test changes locally with Playwright MCP
- Commit the fix with a descriptive message
- Push updates to the branch
# After fixing issues
git add <files>
git commit -m "fix: address review feedback"
git push
8. Test Locally with Playwright
- Use Playwright MCP to verify the changes work correctly
- Navigate through affected user flows
- Capture screenshots if needed for verification
# Start dev server
npm run dev
# Use Playwright MCP tools:
# - mcp__playwright__browser_navigate
# - mcp__playwright__browser_click
# - mcp__playwright__browser_snapshot
# - mcp__playwright__browser_take_screenshot
9. Iterate Until Complete
- Repeat steps 6-8 until all review comments are resolved
- Ensure all CI checks pass
10. Merge Pull Request
Only merge when ALL conditions are met:
- All CI checks pass
- Local tests pass with Playwright
- No unresolved review comments
- No merge conflicts
# Verify merge readiness
gh pr view <pr-number> --json mergeable,mergeStateStatus
# Should show: "mergeStateStatus":"CLEAN","mergeable":"MERGEABLE"
# Merge with squash
gh pr merge <pr-number> --squash --delete-branch
11. Wait for Railway Deployment
- Railway auto-deploys on merge to main
- Check deployment status
# Switch to main and pull
git checkout main && git pull
# Check Railway project status
railway status
# Get production domain
railway domain
12. Check Railway Logs
- Check deploy logs for build errors
- Check application logs for runtime errors
- Look for startup issues, database connection problems, etc.
# View recent logs
railway logs
# Look for specific patterns
railway logs 2>&1 | head -100
13. Fix Deployment Issues (if any)
If deployment fails or logs show errors:
- Identify the root cause from logs
- Create a hotfix on a new branch
- Test the fix locally
- Fast-track PR and merge
- Re-verify deployment
# Create hotfix branch
git checkout -b fix/hotfix-name
# ... make fixes ...
git add . && git commit -m "fix: hotfix description"
git push -u origin fix/hotfix-name
gh pr create --title "fix: hotfix" --body "Hotfix for production issue"
gh pr merge <pr-number> --squash --delete-branch
14. Verify Production with Playwright
- Navigate to production URL with Playwright MCP
- Test all affected user flows on live site
- Verify the feature works as expected in production
- Check for any console errors or visual regressions
# Get production URL
railway domain
# Returns: https://<app-name>.up.railway.app
# Use Playwright MCP to test production:
# mcp__playwright__browser_navigate to production URL
# mcp__playwright__browser_click through user flows
# mcp__playwright__browser_snapshot to verify state
# mcp__playwright__browser_console_messages to check for errors
Notes
- Always test locally before pushing fixes
- Keep commits atomic and well-described
- Respond to review comments with explanations when needed
- Production URL can be found with
railway domain
Testing Requirements for New Features
When adding new features, ensure tests are updated:
Unit tests: Add tests for new business logic
- Timer/duration calculations →
src/lib/__tests__/timer-utils.test.ts - Workout generation logic →
src/lib/__tests__/workout-generator.test.ts - New utilities → create new test file in
__tests__directory
- Timer/duration calculations →
E2E tests: Add tests for new user-facing flows
- Authentication cha
Maintain Pr?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Pr on getagentictools](https://getagentictools.com/loops/vinzenzweber-pull-request-workflow?ref=badge)