Skip to content

Instantly share code, notes, and snippets.

@JaspritBola
Last active April 28, 2023 10:14
Show Gist options
  • Select an option

  • Save JaspritBola/cdfe1801e026533659264a9cd943185e to your computer and use it in GitHub Desktop.

Select an option

Save JaspritBola/cdfe1801e026533659264a9cd943185e to your computer and use it in GitHub Desktop.
Github CLI aliases
# I've use PowerShell escaping for the strings
# adds 'rr' to list reviews that have been requested and provide a link
gh alias set rr 'search prs --sort=updated --review-requested=@me --state=open --json repository,number,title,url,updatedAt --template ''
Review Requests: You have {{len .}}.
{{range .}}{{tablerow (timeago .updatedAt) (printf \"#%v\" .number | autocolor \"green\") (hyperlink .url .title)}}{{end}}'''
# adds 'approved' to list approved prs and provide a link
gh alias set approved 'search prs --sort=updated --author=@me --state=open --review=approved --json repository,number,title,url,updatedAt --template ''
Approved PRs thats are still open: You have {{len .}}
{{range .}}{{tablerow (timeago .updatedAt) (printf \"#%v\" .number | autocolor \""green\"") (hyperlink .url .title)}}{{end}}'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment