Created
May 11, 2021 23:04
-
-
Save heaths/5c7ba9dda978b3f8cb306be3a899c926 to your computer and use it in GitHub Desktop.
GitHub CLI aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases allow you to create nicknames for gh commands | |
aliases: | |
co: pr checkout | |
# The following aliases require https://github.com/cli/cli/pull/3519 | |
issues: |- | |
issue list --json number,title,labels,updatedAt --template '{{range .}}{{if .labels}}{{row (printf "#%v" .number | autocolor "green") .title (pluck "name" .labels | join ", " | printf "(%s)" | autocolor "gray+h") (timeago .updatedAt | printf "about %s" | autocolor "gray+h")}}{{else}}{{row (printf "#%v" .number | autocolor "green") .title "" (timeago .updatedAt | printf "about %s" | autocolor "gray+h")}}{{end}}{{end}}' | |
users: |- | |
api graphql --paginate | |
--template '{{range .data.repository.assignableUsers.nodes}}{{if .status}}{{row (autocolor "green" .login) .name (autocolor "gray+h" .email) (autocolor "yellow" .status.message)}}{{else}}{{row (autocolor "green" .login) .name (autocolor "gray+h" .email) ""}}{{end}}{{end}}' | |
-F owner=':owner' -F repo=':repo' -F name='$1' -f query=' | |
query ($repo: String!, $owner: String!, $name: String!, $endCursor: String) { | |
repository(name: $repo, owner: $owner) { | |
assignableUsers(first: 100, after: $endCursor, query: $name) { | |
nodes { | |
login | |
name | |
status { | |
message | |
} | |
}, | |
pageInfo { | |
hasNextPage | |
endCursor | |
} | |
} | |
} | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment