# Viewing a list of open issues
~/Projects/my-project$ gh issue list
Issues for owner/repo
#14 Update the remote url if it changed (bug)
#14 PR commands on a detached head (enhancement)
#13 Support for GitHub Enterprise (wontfix)
#8 Add an easier upgrade command (bug)
~/Projects/my-project$
이슈를 터미널에서 대화형으로 생성
# Create an issue interactively
~/Projects/my-project$ gh issue create
Creating pull request for feature-branch into main in owner/repo
? Title My new issue
? Body [(e) to launch nano, enter to skip]
http://github.com/owner/repo/issues/1
~/Projects/my-project$
이슈를 명령줄에서 한줄로 생성
# Create an issue using flags
~/Projects/my-project$ gh issue create --title "Issue title" --body "Issue body"
http://github.com/owner/repo/issues/1
~/Projects/my-project$
이슈를 웹브라우저로 생성
// Quickly navigate to the issue creation page
~/Projects/my-project$ gh issue create --web
Opening https://github.com/owner/repo/issues/new in your browser.
~/Projects/my-project$
이슈 닫기
gh issue close {<number> | <url>} [flags]
풀리퀘스트(PR) 관리
요청된 PR을 체크아웃
// Checking out a pull request locally
~/Projects/my-project$ gh pr checkout 12
remote: Enumerating objects: 66, done.
remote: Counting objects: 100% (66/66), done.
remote: Total 83 (delta 66), reused 66 (delta 66), pack-reused 17
Unpacking objects: 100% (83/83), done.
From https://github.com/owner/repo
* [new ref] refs/pull/8896/head -> patch-2
M README.md
Switched to branch 'patch-2'
~/Projects/my-project$
PR의 변경내용 확인
gh pr diff [<number> | <url> | <branch>] [flags]
PR 머지하기
기본값으로 PR을 머지한 후에는 원격 저장소와 로컬 저장소의 PR 브랜치를 삭제하게 되어있습니다. 유지하려면 ‘–delete-branch=false’ 을 사용하세요.