Browse Source

added alias "curl-github-ref-status"

Fabian Peter Hammerle 3 years ago
parent
commit
e217852688
1 changed files with 2 additions and 0 deletions
  1. 2 0
      gitconfig

+ 2 - 0
gitconfig

@@ -79,6 +79,8 @@
 	c = commit
 	# git curl-github-api /commits/master/statuses | jq '.[].state'
 	curl-github-api = "!f() { path="$1"; shift; git github-repo-names | xargs -I{} --verbose curl --header 'Accept: application/vnd.github.v3+json' 'https://api.github.com/repos/{}'\"$path\" "$@"; }; f"
+	# git curl-github-ref-status dev | jq '{state, statuses, commit_url}'
+	curl-github-ref-status = "!f() { ref="$1"; shift; git curl-github-api "/commits/$ref/status" "$@"; }; f"
 	d = diff
 	f = fetch --prune
 	github-repo-names = !git github-urls | grep --only-matching --perl-regexp 'github.com/\\K.+(?=\\.git)'