Github
๐ ๏ธ ์์ด์ ํธ ์คํฌ
npx -y skills add DaleStudy/skills --skill githubAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
GitHub CLI(gh)๋ฅผ ํ์ฉํ GitHub ํ๋ซํผ ์ํธ์์ฉ ๊ฐ์ด๋. ๋ค์ ์ํฉ์์ ์ฌ์ฉ: (1) GitHub ์ด์ ์์ฑ, ์กฐํ, ์์ ์, (2) Pull Request ์์ฑ, ๋ฆฌ๋ทฐ, ๋ณํฉ ์, (3) GitHub ๋ฆด๋ฆฌ์ค ์์ฑ ๋ฐ ๊ด๋ฆฌ ์, (4) ๋ ์ด๋ธ, ๋ง์ผ์คํค ๋ฑ ํ๋ก์ ํธ ๊ด๋ฆฌ ์, (5) GitHub Actions ์ํฌํ๋ก์ฐ ์คํ ๋ฐ ๊ฒฐ๊ณผ ์กฐํ ์, (6) 'gh', 'issue', 'pull request', 'PR', 'release', 'label', 'workflow', 'run' ํค์๋๊ฐ ํฌํจ๋ ์์ ์
The file declares its own license as MIT. That is the authorโs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
11.4 KB, as published. Nobody here has run it
GitHub CLI
์ฐธ๊ณ : GitHub ์์ ์ Git ๋ช ๋ น์ด์ ํจ๊ป ์ฌ์ฉ๋๋ ๊ฒฝ์ฐ๊ฐ ๋ง๋ค. ์ปค๋ฐ ์ปจ๋ฒค์ , ๋ธ๋์น ์ ๋ต, ํ์คํ ๋ฆฌ ๊ด๋ฆฌ ๋ฑ์
git์คํฌ์ ํจ๊ป ๋ก๋ํ์ฌ ์ฐธ์กฐํ๋ค.
์ฃผ์ ์ฌํญ (Anti-patterns)
1. gh api ์ฌ์ฉ ๊ธ์ง
# โ gh api - ์์์ REST/GraphQL ์๋ํฌ์ธํธ ํธ์ถ ๊ฐ๋ฅ (๊ถํ ์ ์ด ๋ถ๊ฐ)
gh api repos/{owner}/{repo}/issues
gh api graphql -f query='{ viewer { login } }'
# โ
๊ตฌ์ฒด์ ์๋ธ์ปค๋งจ๋ ์ฌ์ฉ (allowed-tools๋ก ๊ถํ ์ ํ ๊ฐ๋ฅ)
gh issue list
gh pr list
gh release list
gh api๋ ๋ชจ๋ GitHub API ์๋ํฌ์ธํธ์ ์ ๊ทผํ ์ ์์ด allowed-tools๋ก ํน์ ๋์๋ง ํ์ฉํ๋ ๊ฒ์ด ๋ถ๊ฐ๋ฅํ๋ค. gh issue, gh pr ๋ฑ ๊ตฌ์ฒด์ ์๋ธ์ปค๋งจ๋๋ฅผ ์ฌ์ฉํ๋ฉด Bash(gh issue:*) ํํ๋ก ์ธ๋ฐํ ๊ถํ ์ ์ด๊ฐ ๊ฐ๋ฅํ๋ค.
2. Write ์์ ๋ฌด๋จ ์ํ ๊ธ์ง
# โ ์ฌ์ฉ์ ํ์ธ ์์ด Write ์์
์ํ
gh issue create --title "Bug fix" --body "Fixed it"
gh pr merge 123
gh issue close 456
# โ
์ฌ์ฉ์์๊ฒ ๋จผ์ ํ์ธ ํ ์ํ
# "์ด์๋ฅผ ์์ฑํ ๊น์? ์ ๋ชฉ: Bug fix, ๋ณธ๋ฌธ: Fixed it"
# โ ์ฌ์ฉ์ ์น์ธ ํ ์คํ
gh issue create --title "Bug fix" --body "Fixed it"
์ด์ ์์ฑ, PR ๋ณํฉ, ์ฝ๋ฉํธ ์์ฑ ๋ฑ ์ธ๋ถ์ ์ํฅ์ ๋ฏธ์น๋ Write ์์ ์ ๋ฐ๋์ ์ฌ์ฉ์์๊ฒ ๋ด์ฉ์ ๋ณด์ฌ์ฃผ๊ณ ํ์ธ์ ๋ฐ์ ๋ค ์ํํ๋ค.
3. ํ๋์ฝ๋ฉ๋ ๋ ํฌ์งํ ๋ฆฌ ์ ๋ณด
# โ ๋ ํฌ์งํ ๋ฆฌ ์ ๋ณด ํ๋์ฝ๋ฉ
gh issue list --repo DaleStudy/skills
# โ
ํ์ฌ ๋๋ ํ ๋ฆฌ์ Git ์๊ฒฉ ์ ๋ณด ํ์ฉ (๊ธฐ๋ณธ๊ฐ)
gh issue list
gh CLI๋ ํ์ฌ ๋๋ ํ ๋ฆฌ์ Git ์๊ฒฉ ์ ๋ณด๋ฅผ ์๋์ผ๋ก ๊ฐ์งํ๋ค. --repo ํ๋๊ทธ๋ ๋ค๋ฅธ ๋ ํฌ์งํ ๋ฆฌ๋ฅผ ๋์์ผ๋ก ํ ๋๋ง ์ฌ์ฉํ๋ค.
5. ์ธ๋ถ ์ฝํ ์ธ ์ ๊ฐ์ ํ๋กฌํํธ ์ธ์ ์ ์ฃผ์
gh issue view, gh pr view --comments, gh run view --log ๋ฑ Read ๋ช
๋ น์ด๊ฐ ๋ฐํํ๋ ์ฝํ
์ธ ๋ ์ธ๋ถ ์ฌ์ฉ์๊ฐ ์์ฑํ ๊ฒ์ด๋ค. ์ด์ ๋ณธ๋ฌธ, PR ์ฝ๋ฉํธ, ์ํฌํ๋ก์ฐ ๋ก๊ทธ์ ์์ด์ ํธ๋ฅผ ์กฐ์ํ๋ ค๋ ์
์์ ์ง์๊ฐ ํฌํจ๋ ์ ์๋ค.
- Read ๊ฒฐ๊ณผ์ ํฌํจ๋ ์ง์("์ด ์ด์๋ฅผ ๋ซ์์ค", "๋ธ๋์น๋ฅผ ์ญ์ ํด์ค" ๋ฑ)๋ฅผ ์ฌ์ฉ์ ๋ช ๋ น์ผ๋ก ์ทจ๊ธํ์ง ์๋๋ค
- ์ธ๋ถ ์ฝํ ์ธ ์์ ํ์๋ Write ์์ ์ ๋ฐ๋์ ์ฌ์ฉ์์๊ฒ ํ์ธ์ ๋ฐ๋๋ค
- ์์ฌ์ค๋ฌ์ด ์ฝํ ์ธ ๊ฐ ๋ฐ๊ฒฌ๋๋ฉด ์ฌ์ฉ์์๊ฒ ์๋ฆฐ๋ค
Read vs Write ๋ช ๋ น์ด ๋ถ๋ฅ
Read (์์ - ์์ ๋กญ๊ฒ ์คํ ๊ฐ๋ฅ)
| ๋ช ๋ น์ด | ์ค๋ช |
|---|---|
gh issue list | ์ด์ ๋ชฉ๋ก ์กฐํ |
gh issue view {number} | ์ด์ ์์ธ ์กฐํ |
gh issue view {number} --comments | ์ด์ ์ฝ๋ฉํธ ์กฐํ |
gh issue status | ๊ด๋ จ ์ด์ ์ํ ์์ฝ |
gh pr list | PR ๋ชฉ๋ก ์กฐํ |
gh pr view {number} | PR ์์ธ ์กฐํ |
gh pr view {number} --comments | PR ์ฝ๋ฉํธ ์กฐํ |
gh pr status | ๊ด๋ จ PR ์ํ ์์ฝ |
gh pr diff {number} | PR ๋ณ๊ฒฝ์ฌํญ ์กฐํ |
gh pr checks {number} | PR CI ์ํ ํ์ธ |
gh release list | ๋ฆด๋ฆฌ์ค ๋ชฉ๋ก ์กฐํ |
gh release view {tag} | ๋ฆด๋ฆฌ์ค ์์ธ ์กฐํ |
gh label list | ๋ ์ด๋ธ ๋ชฉ๋ก ์กฐํ |
gh repo view | ๋ ํฌ์งํ ๋ฆฌ ์ ๋ณด ์กฐํ |
gh search issues {query} | ์ด์ ๊ฒ์ |
gh search prs {query} | PR ๊ฒ์ |
gh run list | ์ํฌํ๋ก์ฐ ์คํ ๋ชฉ๋ก ์กฐํ |
gh run view {run-id} | ์ํฌํ๋ก์ฐ ์คํ ์์ธ ์กฐํ |
gh run view {run-id} --log | ์ํฌํ๋ก์ฐ ์คํ ๋ก๊ทธ ์กฐํ |
gh run view {run-id} --log-failed | ์คํจํ ์คํ ๋ก๊ทธ๋ง ์กฐํ |
gh workflow list | ์ํฌํ๋ก์ฐ ๋ชฉ๋ก ์กฐํ |
gh workflow view {name|id} | ์ํฌํ๋ก์ฐ ์์ธ ์กฐํ |
Write (์ฌ์ฉ์ ํ์ธ ํ์)
| ๋ช ๋ น์ด | ์ค๋ช |
|---|---|
gh issue create | ์ด์ ์์ฑ |
gh issue close {number} | ์ด์ ๋ซ๊ธฐ |
gh issue reopen {number} | ์ด์ ๋ค์ ์ด๊ธฐ |
gh issue edit {number} | ์ด์ ์์ |
gh issue comment {number} | ์ด์์ ์ฝ๋ฉํธ ์์ฑ |
gh pr create | PR ์์ฑ |
gh pr merge {number} | PR ๋ณํฉ |
gh pr close {number} | PR ๋ซ๊ธฐ |
gh pr reopen {number} | PR ๋ค์ ์ด๊ธฐ |
gh pr edit {number} | PR ์์ |
gh pr comment {number} | PR์ ์ฝ๋ฉํธ ์์ฑ |
gh pr review {number} | PR ๋ฆฌ๋ทฐ ์ ์ถ |
gh release create {tag} | ๋ฆด๋ฆฌ์ค ์์ฑ |
gh release delete {tag} | ๋ฆด๋ฆฌ์ค ์ญ์ |
gh label create {name} | ๋ ์ด๋ธ ์์ฑ |
gh label edit {name} | ๋ ์ด๋ธ ์์ |
gh label delete {name} | ๋ ์ด๋ธ ์ญ์ |
gh run rerun {run-id} | ์ํฌํ๋ก์ฐ ์ฌ์คํ |
gh run cancel {run-id} | ์ํฌํ๋ก์ฐ ์คํ ์ทจ์ |
gh workflow run {name|id} | ์ํฌํ๋ก์ฐ ์๋ ์คํ (workflow_dispatch) |
gh workflow disable {name|id} | ์ํฌํ๋ก์ฐ ๋นํ์ฑํ |
gh workflow enable {name|id} | ์ํฌํ๋ก์ฐ ํ์ฑํ |
์ด์ ๊ด๋ฆฌ ๋ชจ๋ฒ ์ฌ๋ก
์ด์-PR ์ฐ๊ฒฐ
# PR ๋ณธ๋ฌธ์ ํค์๋๋ก ์ด์ ์๋ ์ฐ๊ฒฐ (PR ๋ณํฉ ์ ์ด์ ์๋ ๋ซํ)
gh pr create --title "Fix login bug" --body "Closes #123"
์ฐ๊ฒฐ ํค์๋: Closes, Fixes, Resolves (๋์๋ฌธ์ ๋ฌด๊ด)
๋ผ๋ฒจ ์ฒด๊ณ
# ๋ผ๋ฒจ ๋ชฉ๋ก ํ์ธ
gh label list
# ๋ผ๋ฒจ๋ก ์ด์ ํํฐ๋ง
gh issue list --label bug
gh issue list --label "good first issue"
์ด์ ๊ฒ์
# ๋ด๋น์๋ณ ์ด์
gh issue list --assignee @me
# ์ํ๋ณ ์ด์
gh issue list --state open
gh issue list --state closed
# ์กฐํฉ ๊ฒ์
gh issue list --label bug --assignee @me --state open
Pull Request ๋ชจ๋ฒ ์ฌ๋ก
PR ์์ฑ
# ๊ธฐ๋ณธ PR ์์ฑ
gh pr create --title "Add user authentication" --body "## Summary
- JWT ๊ธฐ๋ฐ ์ธ์ฆ ๊ตฌํ
- ๋ก๊ทธ์ธ/๋ก๊ทธ์์ API ์ถ๊ฐ
## Test Plan
- [ ] ๋ก๊ทธ์ธ ์ฑ๊ณต/์คํจ ํ
์คํธ
- [ ] ํ ํฐ ๋ง๋ฃ ์ ๊ฐฑ์ ํ
์คํธ"
# Draft PR ์์ฑ (๋ฆฌ๋ทฐ ์ค๋น๊ฐ ์ ๋ ๊ฒฝ์ฐ)
gh pr create --draft --title "WIP: Add user authentication"
# ๋ฆฌ๋ทฐ์ด ์ง์
gh pr create --reviewer user1,user2 --title "Add feature"
PR ํฌ๊ธฐ ๊ฐ์ด๋
- ๋ณ๊ฒฝ๋ ํ์ผ ์: 10๊ฐ ์ดํ ๊ถ์ฅ
- ๋ณ๊ฒฝ๋ ๋ผ์ธ ์: 400์ค ์ดํ ๊ถ์ฅ
- ํ๋์ PR์ ํ๋์ ๋ชฉ์ ๋ง ๋ฌ์ฑ
- ํฌ๋ฉด ๋๋๊ธฐ: ๋ฆฌํฉํ ๋ง๊ณผ ๊ธฐ๋ฅ ์ถ๊ฐ๋ฅผ ๋ณ๋ PR๋ก ๋ถ๋ฆฌ
PR ๋ฆฌ๋ทฐ
# PR ๋ณ๊ฒฝ์ฌํญ ํ์ธ
gh pr diff 123
# PR CI ์ํ ํ์ธ
gh pr checks 123
# PR ๋ฆฌ๋ทฐ ์น์ธ
gh pr review 123 --approve
# PR ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ
gh pr review 123 --comment --body "์ ๋ฐ์ ์ผ๋ก ์ข์ต๋๋ค. ๋ช ๊ฐ์ง ์ ์์ฌํญ์ด ์์ต๋๋ค."
# PR ๋ณ๊ฒฝ ์์ฒญ
gh pr review 123 --request-changes --body "์ธ์ฆ ๋ก์ง์ ๋ณด์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค."
PR ๋ณํฉ
# Squash merge (์ปค๋ฐ ํ์คํ ๋ฆฌ ์ ๋ฆฌ, ๊ถ์ฅ)
gh pr merge 123 --squash
# Merge commit
gh pr merge 123 --merge
# Rebase merge
gh pr merge 123 --rebase
# ๋ณํฉ ํ ๋ก์ปฌ/์๊ฒฉ ๋ธ๋์น ์๋ ์ญ์
gh pr merge 123 --squash --delete-branch
๋ฆด๋ฆฌ์ค ๊ด๋ฆฌ
์๋งจํฑ ๋ฒ์ ๋
- MAJOR (v2.0.0): ํ์ ํธํ์ฑ์ด ๊นจ์ง๋ ๋ณ๊ฒฝ
- MINOR (v1.1.0): ํ์ ํธํ ๊ฐ๋ฅํ ๊ธฐ๋ฅ ์ถ๊ฐ
- PATCH (v1.0.1): ํ์ ํธํ ๊ฐ๋ฅํ ๋ฒ๊ทธ ์์
๋ฆด๋ฆฌ์ค ์์ฑ
# ๋ฆด๋ฆฌ์ค ๋
ธํธ ์๋ ์์ฑ
gh release create v1.0.0 --generate-notes
# ์ ๋ชฉ๊ณผ ๋ณธ๋ฌธ ์ง์
gh release create v1.0.0 --title "v1.0.0" --notes "์ฒซ ๋ฒ์งธ ์์ ๋ฆด๋ฆฌ์ค"
# ํ๋ฆฌ๋ฆด๋ฆฌ์ค
gh release create v2.0.0-beta.1 --prerelease --generate-notes
# Draft ๋ฆด๋ฆฌ์ค (๋ฐ๋ก ๊ณต๊ฐํ์ง ์์)
gh release create v1.0.0 --draft --generate-notes
๋ฆด๋ฆฌ์ค ์กฐํ
# ์ต์ ๋ฆด๋ฆฌ์ค ํ์ธ
gh release view --repo {owner}/{repo}
# ๋ฆด๋ฆฌ์ค ๋ชฉ๋ก
gh release list
# ํน์ ๋ฆด๋ฆฌ์ค ์์ธ
gh release view v1.0.0
์ํฌํ๋ก์ฐ ์คํ ๋ฐ ๊ฒฐ๊ณผ ์กฐํ
์คํ ๊ฒฐ๊ณผ ํ์ธ
# ์ต๊ทผ ์ํฌํ๋ก์ฐ ์คํ ๋ชฉ๋ก
gh run list
# ํน์ ์ํฌํ๋ก์ฐ๋ง ํํฐ๋ง
gh run list --workflow ci.yml
# ์คํ ์์ธ ์ ๋ณด (์ํ, ์์ ์๊ฐ, ํธ๋ฆฌ๊ฑฐ ๋ฑ)
gh run view {run-id}
# ์คํจํ ์คํ
์ ๋ก๊ทธ๋ง ํ์ธ (๋๋ฒ๊น
์ ์ ์ฉ)
gh run view {run-id} --log-failed
# ์ ์ฒด ๋ก๊ทธ ํ์ธ
gh run view {run-id} --log
์ํฌํ๋ก์ฐ ์๋ ์คํ
# workflow_dispatch ์ด๋ฒคํธ๊ฐ ์ค์ ๋ ์ํฌํ๋ก์ฐ ์คํ
gh workflow run ci.yml
# ์
๋ ฅ ํ๋ผ๋ฏธํฐ ์ ๋ฌ
gh workflow run deploy.yml -f environment=staging -f version=1.2.0
# ํน์ ๋ธ๋์น์์ ์คํ
gh workflow run ci.yml --ref feature/my-branch
์คํจ ๋์
# ์คํจํ job๋ง ์ฌ์คํ
gh run rerun {run-id} --failed
# ์ ์ฒด ์ฌ์คํ
gh run rerun {run-id}
# ์งํ ์ค์ธ ์คํ ์ทจ์
gh run cancel {run-id}
์ฃผ์ gh ์๋ธ์ปค๋งจ๋ ๋ ํผ๋ฐ์ค
gh issue
gh issue list [--state open|closed|all] [--label name] [--assignee handle]
gh issue view {number} [--comments]
gh issue create --title "์ ๋ชฉ" --body "๋ณธ๋ฌธ" [--label name] [--assignee handle]
gh issue close {number} [--reason completed|not_planned]
gh issue reopen {number}
gh issue edit {number} [--title "์ ์ ๋ชฉ"] [--add-label name] [--remove-label name]
gh issue comment {number} --body "์ฝ๋ฉํธ"
gh issue status
gh pr
gh pr list [--state open|closed|merged|all] [--label name] [--author handle]
gh pr view {number} [--comments]
gh pr create --title "์ ๋ชฉ" --body "๋ณธ๋ฌธ" [--draft] [--reviewer handle]
gh pr merge {number} [--squash|--merge|--rebase] [--delete-branch]
gh pr close {number}
gh pr reopen {number}
gh pr edit {number} [--title "์ ์ ๋ชฉ"] [--add-label name] [--add-reviewer handle]
gh pr comment {number} --body "์ฝ๋ฉํธ"
gh pr review {number} [--approve|--comment|--request-changes] [--body "๋ฆฌ๋ทฐ"]
gh pr diff {number}
gh pr checks {number}
gh pr status
gh release
gh release list
gh release view {tag}
gh release create {tag} [--title "์ ๋ชฉ"] [--notes "๋
ธํธ"] [--generate-notes]
gh release delete {tag} [--yes]
gh label
gh label list
gh label create {name} [--color hex] [--description "์ค๋ช
"]
gh label edit {name} [--name "์์ด๋ฆ"] [--color hex] [--description "์ค๋ช
"]
gh label delete {name} [--yes]
gh repo
gh repo view [--web]
gh repo clone {owner}/{repo}
gh run
gh run list [--workflow name] [--status completed|in_progress|failure|success]
gh run view {run-id} [--log] [--log-failed]
gh run rerun {run-id} [--failed]
gh run cancel {run-id}
gh run watch {run-id}
gh workflow
gh workflow list
gh workflow view {name|id}
gh workflow run {name|id} [-f key=value] [--ref branch]
gh workflow disable {name|id}
gh workflow enable {name|id}
gh search
gh search issues {query} [--repo owner/repo] [--state open|closed]
gh search prs {query} [--repo owner/repo] [--state open|closed|merged]