mirror of
https://github.com/CodelyTV/pr-size-labeler.git
synced 2025-02-18 19:12:50 -05:00
refactor: use named argument for pr_number (#36)
This commit is contained in:
parent
bfc42c990b
commit
88ab4d8199
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ github::add_label_to_pr() {
|
|||
local -r l_label="${6}"
|
||||
local -r xl_label="${7}"
|
||||
|
||||
local -r body=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" -H "$GITHUB_API_HEADER" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$1")
|
||||
local -r body=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" -H "$GITHUB_API_HEADER" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$pr_number")
|
||||
local labels=$(echo "$body" | jq .labels | jq -r ".[] | .name" | grep -e "$xs_label" -e "$s_label" -e "$m_label" -e "$l_label" -e "$xl_label" -v)
|
||||
labels=$(printf "%s\n%s" "$labels" "$label_to_add")
|
||||
local -r comma_separated_labels=$(github::format_labels "$labels")
|
||||
|
|
Loading…
Add table
Reference in a new issue