Skip to content

Commit

Permalink
refactor: use named argument for pr_number (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Mar 20, 2022
1 parent bfc42c9 commit 88ab4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 88ab4d8

Please sign in to comment.