From 6628b44fb9aa809a1ce59bce27d011078c208a01 Mon Sep 17 00:00:00 2001 From: noobie3007 <160282956+noobie3007@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:36:03 -0700 Subject: [PATCH] Update add-performance-comment.yml Signed-off-by: noobie3007 <160282956+noobie3007@users.noreply.github.com> --- .github/workflows/add-performance-comment.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/add-performance-comment.yml b/.github/workflows/add-performance-comment.yml index b64fe6a1fac47..6b0bf4793031c 100644 --- a/.github/workflows/add-performance-comment.yml +++ b/.github/workflows/add-performance-comment.yml @@ -12,19 +12,9 @@ jobs: if: github.event.label.name == 'Performance' runs-on: ubuntu-latest steps: - - name: checkout repo - uses: actions/checkout@v3 - name: Add comment to PR - uses: actions/github-script@v6 + uses: peter-evans/create-or-update-comment@v4 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - console.log('Issue', context.issue.number) - console.log('Owner', context.repo.owner) - console.log('Repo', context.repo.repo) - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: "Hello!\nWe have added a performance benchmark workflow that runs by adding a comment on the PR.\n Please refer https://github.com/opensearch-project/OpenSearch/blob/main/PERFORMANCE_BENCHMARKS.md on how to run benchmarks on pull requests." - }) + issue-number: ${{ github.event.pull_request.number }} + body: | + This comment was written by a bot!