diff --git a/.github/workflows/on-hackathon-r2-verified.yaml b/.github/workflows/on-hackathon-r2-verified.yaml index bb3f9b3..ca569ef 100644 --- a/.github/workflows/on-hackathon-r2-verified.yaml +++ b/.github/workflows/on-hackathon-r2-verified.yaml @@ -75,6 +75,13 @@ jobs: $invalid = ("${{ github.event.comment.body }}".StartsWith("/invalid")) ? "true" : "" } + if( github.event.comment.user.login == github.event.issue.assignee.login){ + $rightassignee = "true" + } else{ + $rightassignee = "false" + } + + echo "rightassignee=$rightassignee" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf-8 -Append echo "issueNumber=$($result.issueNumber)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf-8 -Append echo "issueType=$($result.issueType)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf-8 -Append echo "githubID=$($result.githubID)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf-8 -Append @@ -89,7 +96,7 @@ jobs: - name: Add a label - NOT Verified if: | steps.issue.outputs.issueType == 'TOPIC' && - (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true') + (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true' || steps.issue.outputs.rightassignee == 'false') shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -101,7 +108,7 @@ jobs: - name: Comment to issue - NOT Verified if: | steps.issue.outputs.issueType == 'TOPIC' && - (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true') + (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true' || steps.issue.outputs.rightassignee == 'false') uses: actions-cool/issues-helper@v3 with: actions: 'create-comment' @@ -118,7 +125,7 @@ jobs: - name: Close issue - NOT Verified if: | steps.issue.outputs.issueType == 'TOPIC' && - (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true') + (steps.issue.outputs.verified == 'false' || steps.issue.outputs.invalid == 'true' || steps.issue.outputs.rightassignee == 'false') shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -131,7 +138,8 @@ jobs: if: | steps.issue.outputs.issueType == 'TOPIC' && steps.issue.outputs.verified == 'true' && - steps.issue.outputs.inspected == 'true' + steps.issue.outputs.inspected == 'true' && + steps.issue.outputs.rightassignee == 'true' shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -145,7 +153,8 @@ jobs: if: | steps.issue.outputs.issueType == 'TOPIC' && steps.issue.outputs.verified == 'true' && - steps.issue.outputs.inspected == 'true' + steps.issue.outputs.inspected == 'true' && + steps.issue.outputs.rightassignee == 'true' uses: actions-cool/issues-helper@v3 with: actions: 'create-comment' @@ -165,7 +174,8 @@ jobs: if: | steps.issue.outputs.issueType == 'TOPIC' && steps.issue.outputs.verified == 'true' && - steps.issue.outputs.inspected == 'true' + steps.issue.outputs.inspected == 'true' && + steps.issue.outputs.rightassignee == 'true' shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}