This guide documents the GitHub CLI (gh) commands we use in our development workflow.
- GitHub CLI installed
- Authenticated with
gh auth login - Repository cloned locally
# Create a feature issue
gh issue create \
--title "Feature: Your Feature Name" \
--body "# Feature Description
## Description
Detailed description of the feature
## Features
- [ ] Feature item 1
- [ ] Feature item 2
## Benefits
- Benefit 1
- Benefit 2
## Technical Considerations
- Technical point 1
- Technical point 2
## Priority
High/Medium/Low
## Labels
enhancement, feature"
# List issues
gh issue list
# View issue details
gh issue view <issue-number># List projects
gh project list
# View project items
gh project item-list <project-number># Create and push a new tag
git tag -a v1.x.x -m "Release message"
git push origin v1.x.x
# List releases
gh release list
# View release details
gh release view v1.x.xgh repo clone PeterVinter/linux_docker_container_shutdown# View repository details
gh repo view
# View repository settings
gh repo edit# Create PR from current branch
gh pr create \
--title "Feature: Your Feature Name" \
--body "Closes #<issue-number>
## Changes
- Change 1
- Change 2
## Testing
- [ ] Test case 1
- [ ] Test case 2"
# List pull requests
gh pr list
# Check out a pull request locally
gh pr checkout <pr-number># List workflow runs
gh run list
# View specific workflow run
gh run view <run-id>
# Watch workflow run in real-time
gh run watch <run-id>Our repository uses an automated changelog workflow that follows Semantic Versioning and Keep a Changelog standards.
- Major Version (X.0.0): Breaking changes
- Indicated by
feat!:orBREAKING CHANGEin commit message - Example:
feat!: rename repository
- Indicated by
- Minor Version (0.X.0): New features
- Indicated by
feat:in commit message - Example:
feat: add new logging system
- Indicated by
- Patch Version (0.0.X): Bug fixes and small changes
- All other commit types (
fix:,docs:, etc.) - Example:
fix: resolve logging issue
- All other commit types (
feat:→ Addedfix:→ Fixeddocs:→ Documentationrefactor:→ Changedsecurity:→ Securityfeat!:orBREAKING CHANGE→ Breaking Change
- Create a PR with conventional commit message:
gh pr create --title "feat: add new feature" --body "Description of the feature"-
After merge, the workflow automatically:
- Determines change type from PR title
- Increments version number
- Updates CHANGELOG.md
- Creates a new PR with changelog updates
-
Review and merge the changelog PR:
gh pr list # Find the changelog PR
gh pr merge <number> --merge # Merge the changelog PR- Verify the release:
gh release view <version> # e.g., v2.0.0- Create issue:
gh issue create --title "Feature: New Feature" --body "..."- Create branch:
git checkout -b feature/new-feature- Make changes and commit:
git add .
git commit -m "feat: implement new feature"- Create PR:
gh pr create --title "Feature: New Feature" --body "Closes #<issue-number>"- Create release tag:
git tag -a v1.x.x -m "Release message"- Push tag:
git push origin v1.x.x- Verify release:
gh release view v1.x.xAdd these to your .gitconfig:
[alias]
ic = "!gh issue create"
il = "!gh issue list"
prc = "!gh pr create"
prl = "!gh pr list"# Set default editor
export GH_EDITOR=vim
# Set default browser
export GH_BROWSER=firefox# Re-authenticate
gh auth login
# Check auth status
gh auth status# Check API rate limits
gh api rate_limit