From 308f76697723e93ff36fa34e1340379fa3574774 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:40:27 -0400 Subject: [PATCH 1/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index 3ddec8cbf1..c63c8001aa 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -27,22 +27,14 @@ jobs: echo "is_new_blog=false" >> $GITHUB_OUTPUT fi - - name: Get PR body - if: steps.check-new-blog.outputs.is_new_blog == 'true' - id: pr-body - run: | - body="${{ github.event.pull_request.body }}" - echo "body=${body}" >> $GITHUB_OUTPUT - - name: Check for linked issues if: steps.check-new-blog.outputs.is_new_blog == 'true' id: check-issues run: | - body="${{ github.event.pull_request.body }}" - if echo "$body" | grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+"; then - echo "has_issue=true" >> $GITHUB_OUTPUT + if grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" <<< "${{ github.event.pull_request.body }}"; then + echo "has_issue=true" >> $GITHUB_OUTPUT else - echo "has_issue=false" >> $GITHUB_OUTPUT + echo "has_issue=false" >> $GITHUB_OUTPUT fi - name: Comment if no linked issue @@ -59,4 +51,4 @@ jobs: - Fixes #issue-number - Resolves #issue-number - 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. \ No newline at end of file + 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. From bae25f6c00f3e70d6b5d5bfdfc2b3105f2b6af2b Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:46:59 -0400 Subject: [PATCH 2/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index c63c8001aa..f0c85e0ba2 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -1,4 +1,4 @@ -name: Check for issue for blogs +name: Check for blog issue on: pull_request: @@ -31,7 +31,8 @@ jobs: if: steps.check-new-blog.outputs.is_new_blog == 'true' id: check-issues run: | - if grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" <<< "${{ github.event.pull_request.body }}"; then + echo '${{ github.event.pull_request.body }}' | grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" > /dev/null + if [ $? -eq 0 ]; then echo "has_issue=true" >> $GITHUB_OUTPUT else echo "has_issue=false" >> $GITHUB_OUTPUT From 3d25036502edbc7f61d3006c41505c7ccb1b038a Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:53:12 -0400 Subject: [PATCH 3/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index f0c85e0ba2..5bff2d6cdd 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -31,12 +31,13 @@ jobs: if: steps.check-new-blog.outputs.is_new_blog == 'true' id: check-issues run: | - echo '${{ github.event.pull_request.body }}' | grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" > /dev/null - if [ $? -eq 0 ]; then - echo "has_issue=true" >> $GITHUB_OUTPUT + echo "${{ github.event.pull_request.body }}" > pr_body.txt + if grep -iE "(closes|fixes|resolves|references|ref|close|fix|resolve) #[0-9]+" pr_body.txt > /dev/null; then + echo "has_issue=true" >> $GITHUB_OUTPUT else - echo "has_issue=false" >> $GITHUB_OUTPUT + echo "has_issue=false" >> $GITHUB_OUTPUT fi + rm pr_body.txt - name: Comment if no linked issue if: steps.check-new-blog.outputs.is_new_blog == 'true' && steps.check-issues.outputs.has_issue == 'false' From 9e883d7f92d50780ee7656470600aef089dced1e Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:25:14 -0400 Subject: [PATCH 4/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index 5bff2d6cdd..4bb511006b 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -27,6 +27,15 @@ jobs: echo "is_new_blog=false" >> $GITHUB_OUTPUT fi + - name: Add blog process comment + if: steps.check-new-blog.outputs.is_new_blog == 'true' + uses: peter-evans/create-or-update-comment@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body: | + The blog process is Submit a PR -> (Optional) Peer review -> Doc review -> Editorial review -> Marketing review -> Published. + - name: Check for linked issues if: steps.check-new-blog.outputs.is_new_blog == 'true' id: check-issues From c35cf12811be2126254e2ea783561681d38ab71f Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:33:24 -0400 Subject: [PATCH 5/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index 4bb511006b..2a983dde0f 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -34,6 +34,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} body: | + Thank you for submitting a blog! + The blog process is Submit a PR -> (Optional) Peer review -> Doc review -> Editorial review -> Marketing review -> Published. - name: Check for linked issues From 71cb64a16cbe7bd43e231e04f7fc44cb65e4e91c Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:04:14 -0400 Subject: [PATCH 6/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index 2a983dde0f..50df4b9127 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -20,7 +20,7 @@ jobs: files_added=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" \ | jq -r '.[] | select(.status == "added" and (.filename | startswith("_posts/"))) | .filename') - + if [ ! -z "$files_added" ]; then echo "is_new_blog=true" >> $GITHUB_OUTPUT else @@ -34,9 +34,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} body: | - Thank you for submitting a blog! - - The blog process is Submit a PR -> (Optional) Peer review -> Doc review -> Editorial review -> Marketing review -> Published. + Thank you for submitting a blog post! + + The blog post review process is: Submit a PR -> (Optional) Peer review -> Doc review -> Editorial review -> Marketing review -> Published. - name: Check for linked issues if: steps.check-new-blog.outputs.is_new_blog == 'true' @@ -58,10 +58,13 @@ jobs: issue-number: ${{ github.event.pull_request.number }} body: | Hi @${{ github.event.pull_request.user.login }}, - - Looks like you're adding a new blog post and you don't have an issue mentioned. Please link this PR to an open issue using one of these keywords in the PR description: + + It looks like you're adding a new blog post but don't have an issue mentioned. Please link this PR to an open issue using one of these keywords in the PR description: - Closes #issue-number - Fixes #issue-number - Resolves #issue-number - + + If an issue hasn't been created yet, please [create one](https://github.com/opensearch-project/project-website/issues/new?template=blog_post.yml) and then link it to this PR. + + 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. From 28d6fedcfd287c6380440d781b39b38a2d2c7f78 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:04:47 -0400 Subject: [PATCH 7/8] Update check-for-issue.yml --- .github/workflows/check-for-issue.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/check-for-issue.yml b/.github/workflows/check-for-issue.yml index 50df4b9127..c337a6e167 100644 --- a/.github/workflows/check-for-issue.yml +++ b/.github/workflows/check-for-issue.yml @@ -65,6 +65,3 @@ jobs: - Resolves #issue-number If an issue hasn't been created yet, please [create one](https://github.com/opensearch-project/project-website/issues/new?template=blog_post.yml) and then link it to this PR. - - - 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. From d86d8c890a8cda9c4aee8ff4f06f5d0fe74ef854 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:05:50 -0400 Subject: [PATCH 8/8] Create new_test.md --- _posts/new_test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 _posts/new_test.md diff --git a/_posts/new_test.md b/_posts/new_test.md new file mode 100644 index 0000000000..ce92700aa4 --- /dev/null +++ b/_posts/new_test.md @@ -0,0 +1 @@ +# Final text