Skip to content

Commit 308f766

Browse files
authored
Update check-for-issue.yml
1 parent ff4b713 commit 308f766

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/check-for-issue.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@ jobs:
2727
echo "is_new_blog=false" >> $GITHUB_OUTPUT
2828
fi
2929
30-
- name: Get PR body
31-
if: steps.check-new-blog.outputs.is_new_blog == 'true'
32-
id: pr-body
33-
run: |
34-
body="${{ github.event.pull_request.body }}"
35-
echo "body=${body}" >> $GITHUB_OUTPUT
36-
3730
- name: Check for linked issues
3831
if: steps.check-new-blog.outputs.is_new_blog == 'true'
3932
id: check-issues
4033
run: |
41-
body="${{ github.event.pull_request.body }}"
42-
if echo "$body" | grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+"; then
43-
echo "has_issue=true" >> $GITHUB_OUTPUT
34+
if grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" <<< "${{ github.event.pull_request.body }}"; then
35+
echo "has_issue=true" >> $GITHUB_OUTPUT
4436
else
45-
echo "has_issue=false" >> $GITHUB_OUTPUT
37+
echo "has_issue=false" >> $GITHUB_OUTPUT
4638
fi
4739
4840
- name: Comment if no linked issue
@@ -59,4 +51,4 @@ jobs:
5951
- Fixes #issue-number
6052
- Resolves #issue-number
6153
62-
If there isn't an issue yet, please [create one](https://github.com/opensearch-project/project-website/issues/new?template=blog_post.yml) and then link it to this PR.
54+
If there isn't an issue yet, please [create one](https://github.com/opensearch-project/project-website/issues/new?template=blog_post.yml) and then link it to this PR.

0 commit comments

Comments
 (0)