Skip to content

Commit 88ab4d8

Browse files
authored
refactor: use named argument for pr_number (CodelyTV#36)
1 parent bfc42c9 commit 88ab4d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/github.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ github::add_label_to_pr() {
3939
local -r l_label="${6}"
4040
local -r xl_label="${7}"
4141

42-
local -r body=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" -H "$GITHUB_API_HEADER" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$1")
42+
local -r body=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" -H "$GITHUB_API_HEADER" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$pr_number")
4343
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)
4444
labels=$(printf "%s\n%s" "$labels" "$label_to_add")
4545
local -r comma_separated_labels=$(github::format_labels "$labels")

0 commit comments

Comments
 (0)