Loading...
Loading...
GitHub operations via gh CLI and GitHub API: create/view/merge PRs, manage issues, query API endpoints, handle workflows in enterprise or public GitHub environments.
npx skill4agent add nextaltair/altairs-agent-dev-kit github-opsgh# Create PR (タイトルはプロジェクトの commit/PR 規約に従う)
gh pr create --title "feat: your PR title" --body "PR description"
# List and view PRs
gh pr list --state open
gh pr view 123
# Manage PRs
gh pr merge 123 --squash
gh pr review 123 --approve
gh pr comment 123 --body "LGTM"references/pr_operations.md# Create and manage issues
gh issue create --title "Bug: Issue title" --body "Issue description"
gh issue list --state open --label bug
gh issue edit 456 --add-label "priority-high"
gh issue close 456references/issue_operations.md# View and manage repos
gh repo view --web
gh repo clone owner/repo
gh repo create my-new-repo --public# Manage GitHub Actions
gh workflow list
gh workflow run workflow-name
gh run watch run-id
gh run download run-idreferences/workflow_operations.mdgh apireferences/api_reference.md# Get PR details via API
gh api repos/{owner}/{repo}/pulls/{pr_number}
# Add PR comment
gh api repos/{owner}/{repo}/issues/{pr_number}/comments \
-f body="Comment text"
# List workflow runs
gh api repos/{owner}/{repo}/actions/runsreferences/api_reference.md# Login to GitHub
gh auth login
# Login to GitHub Enterprise
gh auth login --hostname github.enterprise.com
# Check authentication status
gh auth status
# Set default repository
gh repo set-default owner/repo
# Configure gh settings
gh config set editor vim
gh config set git_protocol ssh
gh config list# JSON output
gh pr list --json number,title,state,author
# JSON with jq processing
gh pr list --json number,title | jq '.[] | select(.title | contains("bug"))'
# Template output
gh pr list --template '{{range .}}{{.number}}: {{.title}}{{"\n"}}{{end}}'references/best_practices.mdgh pr create --title "feat: title" --body "Description" # Create PR
gh pr list # List PRs
gh pr view 123 # View PR details
gh pr checks 123 # Check PR status
gh pr merge 123 --squash # Merge PR
gh pr comment 123 --body "LGTM" # Comment on PR
gh issue create --title "Title" --body "Description" # Create issue
gh workflow run workflow-name # Run workflow
gh repo view --web # Open repo in browser
gh api repos/{owner}/{repo}/pulls/{pr_number} # Direct API call