gh - deptno/deptno.github.io GitHub Wiki
gh|github-cli
λͺ λ Ήμ΄
gh repo view -w
gh pr list
gh pr view xxxx
gh pr list --json number,title -q '.[] | [.number, .title] | @csv' | xsv table
gh pr list -S HASH # 컀λ°μ΄ ν¬ν¨λ pr
gh pr list -S HASH -s merged
gh pr list -S --draft=true # λλννΈμΈ prλ§ λ
ΈμΆ
gh pr list -S 'draft:false' # λλννΈκ° μλ prλ§ λ³΄μ¬μ€λ€
gh pr list -S 'draft:false' -s merged
gh dash # dashboard
gh actions # action κ΄λ ¨ λͺ
λ Ήμ΄
gh-dash
gh dash
λμ보λ ννλ‘ μ΄λ¦¬λλ° path μ μ€μ μ ν΄λλ©΄ μ¬λ¬ PRμ νΈλ¦¬νκ² κ΄λ¦¬κ° κ°λ₯νλ€
λ€μ€ κ³μ
github cli λ‘ νΈλ¦¬ν λͺ λ Ήμ΄ λͺκ°μ§λ₯Ό μ 곡νλ€. λ€μ€ κ³μ μ env μ ν΅ν΄μ μ§μν μ μλ€. direnv μ μ‘°ν©μ νΈν μ¬μ©μ΄ κ°λ₯νλ€. zsh νλ¬κ·ΈμΈλ μ‘΄μ¬νλ―λ‘ λ£μ΄λλ©΄ λ°λ‘ νμ±ν λλ€.
plugins=(
...
direnv
)
ο ~
β .envrc
βββ ο deptno
β βββ ο deptno.github.io.wiki
βββ ο _external
β .envrc
βββ ο rustlings
μμ κ°μ΄ .envrc
νμΌμ΄ λ€μ€μΌλ‘ μ‘΄μ¬νλ κ²½μ° λͺ¨λ λΆλͺ¨μ νκ²½μ μμλ°κ² λλ€.
λλ¬Έμ external
λλ ν 리μ λ€μ΄μ€λ©΄ ν΄λΉ λλ ν 리μ .envrc
λ₯Ό ν΅ν΄μ λΆλͺ¨μ env λ³μλ₯Ό μ€μ ν΄μ
μΆκ°μ μΈ λ‘κ·ΈμΈ μ 보λ₯Ό μ 곡νλ©΄ νΉμ ν΄λμμ λ€λ₯Έ κ³μ μΌλ‘ μ¬μ©μ΄ κ°λ₯νλ€.
template
gh pr list \
--json author,baseRefName,comments,number,title,mergeable,createdAt,isDraft,state \
--template \
'{{tablerow "#" "createdAt" "draft" "state" "base" "mergeable" "author" "title"}}
{{range .}}
{{tablerow .number .createdAt (.isDraft | autocolor "green") .state .baseRefName .mergeable .author.login .title}}
{{end}}'