Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
umpox committed Apr 18, 2023
1 parent d69f8d1 commit 1b33fa1
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/cody-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ jobs:
body: commentBody
});
- name: Remove comment from PR
if: steps.check_label.outputs.action == 'remove_review'
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = context.issue;
# - name: Remove comment from PR
# if: steps.check_label.outputs.action == 'remove_review'
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const pr = context.issue;

github.rest.issues.listComments(pr).then(({ data }) => {
const targetComment = data.find((comment) => comment.body === comment.user.login === 'github-actions[bot]');
# github.rest.issues.listComments(pr).then(({ data }) => {
# const targetComment = data.find((comment) => comment.body === comment.user.login === 'github-actions[bot]');

if (targetComment) {
github.rest.issues.deleteComment({
...pr,
comment_id: targetComment.id
});
}
});
# if (targetComment) {
# github.rest.issues.deleteComment({
# ...pr,
# comment_id: targetComment.id
# });
# }
# });

- name: Check out repository
if: steps.check_label.outputs.action == 'review'
Expand Down

0 comments on commit 1b33fa1

Please sign in to comment.