Skip to content

Instantly share code, notes, and snippets.

@dzuluaga
Created June 28, 2023 17:19
Show Gist options
  • Save dzuluaga/9ef851612caf63644f497cc97eed91cb to your computer and use it in GitHub Desktop.
Save dzuluaga/9ef851612caf63644f497cc97eed91cb to your computer and use it in GitHub Desktop.
The provided single-line command utilizes the GitHub CLI (gh) to retrieve a list of issues from a repository in JSON format. It then applies a custom template to format and present the issue number, title, author, assignees, creation date, and description.
gh issue list --json number,title,createdAt,assignees,body,author --template \
'# {{printf "GitHub Issues"}}
{{range .}}
## {{printf "#%v" .number}} {{.title}}
## Tester
{{.author.name}}{{if .author.name}} - {{end}}{{.author.login}}
### Assignees
{{range .assignees}}{{.name}} {{.login}} {{if .name}},{{end}}{{end}}
### Created at
{{.createdAt}}
### Description
{{.body}}
{{end}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment