ci: shellcheck SC2155

SC2155 (warning): Declare and assign separately to avoid masking return
values, should be harmless.

Related to: #10951

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This commit is contained in:
Lukáš Doktor 2025-03-19 10:16:20 +01:00
parent 6552ac41e0
commit d80e7c7644
No known key found for this signature in database
GPG Key ID: 26B362E47FCF22C1

View File

@ -59,7 +59,8 @@ list_issues_for_pr()
[[ -z "${pr}" ]] && die "need PR"
local commits=$(gh pr view "${pr}" --repo "${repo}" --json commits --jq .commits[].messageBody)
local commits
commits=$(gh pr view "${pr}" --repo "${repo}" --json commits --jq .commits[].messageBody)
[[ -z "${commits}" ]] && die "cannot determine commits for PR ${pr}"
@ -78,7 +79,8 @@ list_issues_for_pr()
#
# "<git-commit> <git-commit-msg>"
#
local issues=$(echo "${commits}" |\
local issues
issues=$(echo "${commits}" |\
grep -v -E "^( | )" |\
grep -i -E "fixes:* *(#*[0-9][0-9]*)" |\
tr ' ' '\n' |\
@ -105,7 +107,8 @@ list_labels_for_issue()
[[ -z "${issue}" ]] && die "need issue number"
local labels=$(gh issue view "${issue}" --repo kata-containers/kata-containers --json labels)
local labels
labels=$(gh issue view "${issue}" --repo kata-containers/kata-containers --json labels)
[[ -z "${labels}" ]] && die "cannot determine labels for issue ${issue}"