Skip to content

Commit d13280a

Browse files
committed
Only comment on issues if no other comments exist yet
1 parent 94b6c39 commit d13280a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/issue-label-commenter.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@ jobs:
77
comment:
88
runs-on: ubuntu-18.04
99
steps:
10+
- name: get comment count
11+
id: getCommentCount
12+
env:
13+
comments: ${{ github.event.issue.comments }}
14+
run: |
15+
echo "$comments"
16+
CL=$(echo $comments | jq '. | length' )
17+
echo "::set-output name=comments_length::$CL"
1018
- uses: actions/checkout@v2
19+
if: steps.getCommentCount.outputs.comments_length == 0
1120
- uses: peaceiris/actions-label-commenter@v1
21+
if: steps.getCommentCount.outputs.comments_length == 0
1222
with:
1323
github_token: ${{ secrets.PAT }}
1424
config_file: .github/issue-commenter.yml

0 commit comments

Comments
 (0)