File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 5050 GITHUB_TOKEN : ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
5151 run : |
5252 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]+$')
5459 echo "Extracted issue numbers: $ISSUE_NUMS"
5560
5661 if [ -n "$ISSUE_NUMS" ]; then
6772 echo "DIY_DOCS_LABEL=true" >> $GITHUB_ENV
6873 break
6974 else
70- echo "DIY docs label not found for issue # $ISSUE_NUM."
75+ echo "DIY docs label not found for issue $ISSUE_NUM."
7176 fi
7277 else
7378 echo "Issue $ISSUE_NUM does not exist in the docs-content repository."
You can’t perform that action at this time.
0 commit comments