Skip to content

Commit 8c9c577

Browse files
committed
ci(check-pr): use literal comparison
1 parent db7fe44 commit 8c9c577

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.github/workflows/check-pr.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,14 @@ jobs:
5858
for label in build chore ci docs feat fix perf refactor test style ; do
5959
if [[ "${label}" == "${type}" ]]; then
6060
echo "Label to add: ${label}"
61-
# shellcheck disable=SC2076
62-
if [[ "${PR_LABELS}" =~ "\"${label}\"" ]] ; then
61+
if [[ "${PR_LABELS}" == *"${label}"* ]] ; then
6362
echo "Label ${label} already present"
6463
else
6564
add_labels+=("${label}")
6665
fi
6766
else
6867
echo "Label to remove: ${label}"
69-
# shellcheck disable=SC2076
70-
if [[ "${PR_LABELS}" =~ "\"${label}\"" ]] ; then
68+
if [[ "${PR_LABELS}" == *"${label}"* ]] ; then
7169
remove_labels+=("${label}")
7270
else
7371
echo "Label ${label} not present"
@@ -78,8 +76,7 @@ jobs:
7876
regexp2='^[a-zA-Z0-9]+\([a-zA-Z0-9\-]*deps\)$'
7977
if [[ "${scoped_type}" =~ ${regexp2} ]] ; then
8078
echo "Label to add: dependencies"
81-
# shellcheck disable=SC2076
82-
if [[ "${PR_LABELS}" =~ "\"dependencies\"" ]] ; then
79+
if [[ "${PR_LABELS}" == *"dependencies"* ]] ; then
8380
echo "Label dependencies already present"
8481
else
8582
add_labels+=('dependencies')
@@ -93,16 +90,14 @@ jobs:
9390
|| "${type}" == 'style' \
9491
|| "${type}" == 'test' ]] ; then
9592
echo "Label to add: no-release-notes"
96-
# shellcheck disable=SC2076
97-
if [[ "${PR_LABELS}" =~ "\"no-release-notes\"" ]] ; then
93+
if [[ "${PR_LABELS}" == *"no-release-notes"* ]] ; then
9894
echo "Label no-release-notes already present"
9995
else
10096
add_labels+=('no-release-notes')
10197
fi
10298
else
10399
echo "Label to remove: no-release-notes"
104-
# shellcheck disable=SC2076
105-
if [[ "${PR_LABELS}" =~ "\"no-release-notes\"" ]] ; then
100+
if [[ "${PR_LABELS}" == *"no-release-notes"* ]] ; then
106101
remove_labels+=('no-release-notes')
107102
else
108103
echo "Label no-release-notes not present"

.github/workflows/maven-dependency-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
set -euo pipefail
4545
# Do not set IFS=$'\n\t', breaks ${MAVEN_CLI_OPTS}
46-
# shellcheck disable=SC2086
46+
# shellcheck disable=SC2086 # [Double quote to prevent globbing and word splitting]: splitting is desired for MAVEN_CLI_OPTS
4747
./mvnw ${MAVEN_CLI_OPTS} -DdependencyCheck.NVDApiKey=${NVD_API_KEY} dependency-check:aggregate
4848
- name: Upload artifacts
4949
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

xml/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ ARG USER_GECOS=Default
1010
SHELL ["/bin/ash", "-euo", "pipefail", "-c"]
1111

1212
# @TL FIXME: xml2rfc currently only in edge stream
13-
# hadolint ignore=DL3019
1413
RUN apk upgrade --no-cache \
1514
&& apk add --no-cache \
1615
coreutils=9.7-r1 \

0 commit comments

Comments
 (0)