Skip to content

Commit

Permalink
Merge pull request #13 from gennaro-tedesco/return_issue_title
Browse files Browse the repository at this point in the history
returning issue title as well as URL with flag -o
  • Loading branch information
gennaro-tedesco authored Aug 10, 2024
2 parents 80410bc + b3c13b8 commit 1f1dfe4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var rootCmd = &cobra.Command{
os.Exit(1)
}
if output {
fmt.Println(issues[idx].Title)
fmt.Println(issues[idx].URL)
} else {
args := []string{"issue", "view", issues[idx].URL, "-w"}
Expand Down Expand Up @@ -131,5 +132,8 @@ Examples:
# search by title and body
gh i -l="bug" -t="upgrade" -b="new version breaks"
# crete a new branch from issue
gh -i -o | head -n1 | tr " " "-" | xargs -p -t git checkout -b
`
}

0 comments on commit 1f1dfe4

Please sign in to comment.