Skip to content

Instantly share code, notes, and snippets.

@vilmibm
Last active July 1, 2021 21:19
Show Gist options
  • Save vilmibm/ee6ed8a783e4fef5b69b2ed42d743b1a to your computer and use it in GitHub Desktop.
Save vilmibm/ee6ed8a783e4fef5b69b2ed42d743b1a to your computer and use it in GitHub Desktop.
Some useful aliases for CLI team first responders

First Responder Aliases

label

Add a label to an issue.

gh label 60 bug

triage

Returns all issues that:

  • are open
  • have zero labels or lack at least one of p1, p2, p3, needs-design, blocked, needs-user-input, core, or help-wanted
aliases:
label: '!jq -n "{\"labels\":[\"$2\"]}" | ghd api "repos/:owner/:repo/issues/$1/labels" --input -'
triage: '!ghd api graphql --paginate -Fquery=''query($endCursor:String){repository(owner:"cli",name:"cli"){issues(first:100,states:OPEN,after:$endCursor){pageInfo{hasNextPage endCursor}edges{node{number title labels(first:10){totalCount edges{node{name}}}}}}}}'' | jq -r ''.data.repository.issues.edges|map(.node)|map(select(any(.labels.edges[]; .node.name | test("p1|p2|p3|core|help wanted|tracking issue|needs-design|blocked|needs-user-input")) | not))|map("\(.number)\t\(.title)")|.[]'''
@loveyoucomtw
Copy link

@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment