Last Updated: May 1, 2025
Pull Requests
git push -u origin feature-branchPush branch and set upstream before creating PR
gh pr create --title Title --body DescriptionCreate a Pull Request via GitHub CLI
gh pr checkout 123Check out a PR locally for review
gh pr diff 123View the diff of a PR from the terminal
gh pr review 123 --approveApprove a PR via GitHub CLI
gh pr review 123 --request-changesRequest changes on a PR
gh pr merge 123 --squashMerge a PR with squash strategy
gh pr list --state openList all open pull requests
Code Review Best Practices
| Item | Description |
|---|---|
Draft PRs | Open PRs as drafts for early feedback, convert when ready |
Small PRs | Keep PRs under 400 lines — easier to review, fewer bugs |
Review Checklist | Does it work? Is it tested? Is it readable? Is it secure? |
Inline Suggestions | Use GitHub's suggestion feature to propose exact code changes |
CI Must Pass | Configure branch protection to require CI checks before merge |
Review in Order | Review commits individually for logical progression |
Request Specific Reviewers | Assign domain experts rather than broad teams |
Respond to All Comments | Address or discuss every review comment before merging |
Issues & Projects
| Item | Description |
|---|---|
Labels | Use consistent labels: bug, enhancement, documentation, good-first-issue |
Issue Templates | Create .github/ISSUE_TEMPLATE/ for bug reports and feature requests |
Milestones | Group issues into milestones to track progress toward releases |
Projects (Beta) | Kanban boards for sprint planning and task management |
Auto-close Keywords | Include 'Fixes #123' in commit messages to auto-close issues |
Issue Forms | Use YAML issue forms for structured data collection |
Task Lists | Use - [ ] checkboxes to break issues into subtasks |
Assignees | Assign issues to team members for clear ownership |
GitHub Actions CI/CD
name: CI on: pushBasic workflow trigger — runs on every push
runs-on: ubuntu-latestSpecify runner OS for the job
actions/checkout@v4Standard action to check out repository code
actions/setup-node@v4Setup action for Node.js environment
npm testRun test suite in CI pipeline
secrets.NPM_TOKENAccess repository secrets in workflow files
on: pull_requestTrigger workflow on PR open, sync, or reopen
matrix: node-version: [16,18,20]Test across multiple versions with matrix strategy
Pro Tip: Use Draft Pull Requests for early feedback. Switch to 'Ready for Review' when your code is complete — reviewers won't be notified until then.