Skip to content

Commit 305a8fd

Browse files
committed
fix(workflows): improve the extraction of the issue number in the label synchronization workflow
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent cc91437 commit 305a8fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/label-sync.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
BODY: ${{ github.event.pull_request.body }}
2828
TITLE: ${{ github.event.pull_request.title }}
2929
run: |
30-
ISSUE=$(echo "$TITLE $BODY" | grep -oiE '(closes|fixes|resolves|addresses)\s+#[[:digit:]]+')
30+
ISSUE=$(echo "$TITLE $BODY" | \
31+
grep -oiE '(closes|fixes|resolves|addresses)\s+#[[:digit:]]+' | \
32+
grep -oE '#[[:digit:]]+' | head -1 | tr -d '#')
3133
3234
if [ -n "$ISSUE" ]; then
3335
echo "issue_number=$ISSUE" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)