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}}'

link