-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgh_alias.yml
20 lines (20 loc) · 2.24 KB
/
gh_alias.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clean-up: '!gh co-default && git pull'
clup: '!gh clean-up'
clup-all: '!gh repo list u21 --json name --jq ".[].name" | xargs -P 0 -L1 -I {} sh -c "cd /Users/garrypolley/dev/unit21/{} && pwd && gh clup || true"'
clup-core: '!echo "umbridge\npensieve" | xargs -I {} sh -c "cd /Users/garrypolley/dev/unit21/{} && pwd && gh clup || true"'
co: pr checkout
co-default: '!branch="$( gh default-branch)"; [ -n "$branch" ] && git checkout $branch'
co-pr: '!gh clean-up && gh pr-branch-name $1 | xargs git checkout'
create-pod-pr: '!team="$( gh team-members sp-o-a-pod)"; [ -n "$team" ] && gh pr create -r "$team" -r "u21/sp-o-a-pod"'
default-branch: '!gh api /repos/{owner}/{repo} --jq ''.default_branch'''
list-branches: '!printf " %-35.35s | %-50.50s \n\n" "Repo" "Current Branch" && gh repo list $GIT_ORG --json name --jq ".[].name" | xargs -L1 -I {} sh -c "cd $ORG_GIT_ROOT/{} 2> /dev/null && echo {} && git branch --show-current" | xargs -n 2 | xargs -L1 -I {} sh -c "printf \"| %-35.35s | %-50.50s |\n\" {}"'
list-devex-prs: '!gh search prs --state=open --review-requested=u21/developer-productivity --json url --jq ".[].url"'
list-team-prs: '!gh team-members-new-line sp-o-a-pod | xargs -L1 -I {} gh search prs --state=open --review-requested=@me --json url --author {} --jq ".[].url"'
list-team-prs--open: '!gh team-members-new-line sp-o-a-pod | xargs -L1 -I {} gh search prs --state=open --json url --author {} --jq ".[].url"'
needs-review: '!gh search prs --state=open --review-requested=@me --sort created --json url --jq ".[].url"'
open-devex-prs: '!gh search prs --state=open --review-requested=u21/developer-productivity --json url --jq ".[].url" | xargs -L1 -I {} open {}'
open-team-prs: '!gh team-members-new-line sp-o-a-pod | xargs -L1 -I {} gh search prs --state=open --review-requested=@me --json url --author {} --jq ".[].url" | xargs -L1 -I {} open {}'
pr-branch-name: '!gh pr list --json url,headRefName --jq ".[] | select(.url == \"$1\") | .headRefName"'
pull-repos: '!gh repo list u21 --json name --jq ".[].name" | xargs -L1 -I {} sh -c "cd /Users/garrypolley/dev/unit21/{} && pwd && git pull || true"'
team-members: '!gh api orgs/u21/teams/$1/members --jq ''[.[].login] | join(",")'''
team-members-new-line: '!gh api orgs/u21/teams/$1/members --jq ''[.[].login] | join("\n")'''