File: check_pr_label.sh

package info (click to toggle)
bats 1.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,016 kB
  • sloc: sh: 4,351; makefile: 33; python: 28; xml: 3
file content (10 lines) | stat: -rwxr-xr-x 238 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/bash

get_pr_json() {
  curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/bats-core/bats-core/pulls/$1"
}

PR_NUMBER="$1"
LABEL="$2"

get_pr_json "$PR_NUMBER" | jq .labels[].name | grep "$LABEL"