File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 50
50
GITHUB_TOKEN : ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
51
51
run : |
52
52
echo "Extracting issue numbers from PR description..."
53
- ISSUE_NUMS=$(echo "${{ github.event.pull_request.body }}" | grep -oE '(https://github.com/github/docs-content/issues/[0-9]+|github/docs-content#[0-9]+|#[0-9]+)' | grep -oE '[0-9]+$')
53
+
54
+ # Clean up PR description to avoid syntax errors in grep command
55
+ PR_BODY=$(printf '%q' "${{ github.event.pull_request.body }}")
56
+ echo "PR description to use in the script: $PR_BODY"
57
+
58
+ ISSUE_NUMS=$(echo "$PR_BODY" | grep -oE '(https://github.com/github/docs-content/issues/[0-9]+|github/docs-content#[0-9]+|#[0-9]+)' | grep -oE '[0-9]+$')
54
59
echo "Extracted issue numbers: $ISSUE_NUMS"
55
60
56
61
if [ -n "$ISSUE_NUMS" ]; then
67
72
echo "DIY_DOCS_LABEL=true" >> $GITHUB_ENV
68
73
break
69
74
else
70
- echo "DIY docs label not found for issue # $ISSUE_NUM."
75
+ echo "DIY docs label not found for issue $ISSUE_NUM."
71
76
fi
72
77
else
73
78
echo "Issue $ISSUE_NUM does not exist in the docs-content repository."
You can’t perform that action at this time.
0 commit comments