Skip to content

Commit

Permalink
fix: set correct conditions
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Polyakov <[email protected]>
  • Loading branch information
Jeredian committed Apr 22, 2024
1 parent c932830 commit c394fef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/issue-comment-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
check-conditions:
name: "Check conditions"
runs-on: ubuntu-latest
if: |
!github.event.issue.pull_request &&
github.event.issue.state == 'open'
# Expose step outputs as job outputs
outputs:
has_need_response_labels: ${{ steps.check_labels.outputs.has_need_response_labels }}
Expand All @@ -46,7 +49,7 @@ jobs:
name: 'author'
env:
owner_or_collaborator: ${{ github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'COLLABORATOR' }}
same_author: ${{ github.event.comment.author == github.event.issue.author }}
same_author: ${{ github.event.comment.user.id == github.event.issue.user.id }}
shell: python
run: |
import os
Expand All @@ -63,9 +66,8 @@ jobs:
runs-on: ubuntu-latest
needs: 'check-conditions'
if: |
!github.event.issue.pull_request &&
needs.check-conditions.outputs.has_need_response_labels == 'true' &&
needs.check-conditions.outputs.same_author == 'true'
( needs.check-conditions.outputs.same_author == 'true' || needs.check-conditions.outputs.owner_or_collaborator == 'false' )
steps:
- name: "Generate token"
uses: tibdex/[email protected]
Expand Down Expand Up @@ -120,7 +122,6 @@ jobs:
runs-on: ubuntu-latest
needs: 'check-conditions'
if: |
!github.event.issue.pull_request &&
needs.check-conditions.outputs.has_pending_labels == 'true' &&
needs.check-conditions.outputs.owner_or_collaborator == 'true'
steps:
Expand Down

0 comments on commit c394fef

Please sign in to comment.