Loading...
Loading...
Use after completing implementation - create pull request with complete documentation, proper labels, linked issues, and verification summary
npx skill4agent add troykelly/codex-skills pr-creationcomprehensive-reviewapply-all-findingsclean-commits# Fetch latest
git fetch origin
# Rebase on target (usually main)
git rebase origin/main
# Or merge if preferred
git merge origin/main
# Resolve any conflicts
# Push updated branch
git push --force-with-lease # Safe force push after rebase[Type] Brief description (#issue)feat: Add user authentication (#123)
fix: Resolve session timeout loop (#456)
refactor: Extract validation middleware (#789)
docs: Update API documentation (#101)
chore: Update dependencies (#202)## Summary
[2-3 sentences describing what this PR does and why]
## Changes
- [Bullet point of key change 1]
- [Bullet point of key change 2]
- [Bullet point of key change 3]
## Related Issues
Closes #[ISSUE_NUMBER]
<!-- If multiple issues -->
Relates to #[OTHER_ISSUE]
Depends on #[DEPENDENCY_PR]
## Verification
### Automated Tests
- [x] Unit tests pass
- [x] Integration tests pass
- [ ] E2E tests pass (if applicable)
### Manual Verification
- [x] [Criterion 1 from acceptance criteria]
- [x] [Criterion 2 from acceptance criteria]
- [x] [Criterion 3 from acceptance criteria]
### Screenshots (if UI changes)
| Before | After |
|--------|-------|
|  |  |
## Checklist
- [x] Tests added/updated
- [x] Documentation updated
- [x] Types are complete (no `any`)
- [x] Code follows style guide
- [x] Self-review completed
## Notes for Reviewers
[Any special considerations, areas to focus on, or context]# Create PR with full body
gh pr create \
--title "feat: Add user authentication (#123)" \
--body "$(cat <<'EOF'
## Summary
Implements user authentication with JWT tokens and session management.
Adds login, logout, and protected route middleware.
## Changes
- Add authentication service with JWT signing
- Add login and logout endpoints
- Add authentication middleware for protected routes
- Add session management with Redis
## Related Issues
Closes #123
## Verification
### Automated Tests
- [x] Unit tests pass (47 new tests)
- [x] Integration tests pass
- [x] E2E tests pass
### Manual Verification
- [x] User can log in with valid credentials
- [x] Invalid credentials show error message
- [x] Session persists across page refreshes
- [x] Logout clears session
## Checklist
- [x] Tests added/updated
- [x] Documentation updated
- [x] Types are complete
- [x] Code follows style guide
- [x] Self-review completed
EOF
)" \
--base main \
--head feature/issue-123-user-authentication# Add labels after creation
gh pr edit [PR_NUMBER] --add-label "feature,needs-review"
# Or during creation
gh pr create ... --label "feature" --label "needs-review"# Request reviewers
gh pr edit [PR_NUMBER] --add-reviewer username1,username2
# Or during creation
gh pr create ... --reviewer username1Closes #123 # Closes issue when PR merges
Fixes #123 # Same as closes
Resolves #123 # Same as closes
Relates to #456 # Links but doesn't close
Depends on #789 # Links to dependency## Related Issues
Closes #123, closes #124
Relates to #200
<!-- Or one per line -->
Closes #123
Closes #124
Relates to #200acceptance-criteria-verification## Verification
### Test Results
| Suite | Status | Coverage |
|-------|--------|----------|
| Unit | 47/47 passing | 98% |
| Integration | 12/12 passing | N/A |
| E2E | 5/5 passing | N/A |
### Acceptance Criteria
| # | Criterion | Status |
|---|-----------|--------|
| 1 | User can log in | PASS |
| 2 | Invalid credentials show error | PASS |
| 3 | Session persists | PASS |
| 4 | Logout clears session | PASS |
Full verification report: [Link to issue comment]gh pr create --draft \
--title "WIP: Add user authentication (#123)" \
--body "..."gh pr ready [PR_NUMBER]## Breaking Changes
:warning: **This PR contains breaking changes:**
- `AuthService.login()` now returns `Promise<Session>` instead of `Promise<User>`
- The `session` cookie name changed from `sid` to `session_id`
- Removed deprecated `authenticate()` function
### Migration Guide
1. Update all calls to `login()` to handle new return type
2. Update cookie configuration if hardcoded
3. Replace `authenticate()` with `validateSession()`## Review Guide
This PR is large. Suggested review order:
1. Start with `src/services/auth.ts` (core logic)
2. Then `src/middleware/authenticate.ts` (integration)
3. Then `src/routes/auth.ts` (API surface)
4. Finally tests in `tests/auth/`
### Files by Category
**Core Changes:**
- src/services/auth.ts
- src/models/session.ts
**Integration:**
- src/middleware/authenticate.ts
**API:**
- src/routes/auth.ts
**Tests:**
- tests/auth/*.test.ts# Check PR status
gh pr view [PR_NUMBER]
# Check CI status
gh pr checks [PR_NUMBER]issue-driven-developmentcomprehensive-reviewapply-all-findingsclean-commitsci-monitoring