Skip to content

Create IPEntity_Workday.yaml #2595

Create IPEntity_Workday.yaml

Create IPEntity_Workday.yaml #2595

name: run script on changing detections
on:
pull_request:
paths:
- 'Detection**'
- 'Solutions/**/Analytic Rules/**'
jobs:
checkCommentAlreadyExist:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork }}
outputs:
hasAutoDetectionComment: ${{ steps.job1.outputs.hasAutoDetectionComment }}
steps:
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Hello how are you I am GitHub bot
- id: job1
shell: pwsh
run: |
$commentId = ${{ steps.fc.outputs.comment-id }}
if ($commentId) {
Write-Output "hasAutoDetectionComment=$true" >> $env:GITHUB_OUTPUT
Write-Host "Comment Already Present!"
} else {
Write-Output "hasAutoDetectionComment=$false" >> $env:GITHUB_OUTPUT
Write-Host "Comment Not Present!"
}
add-comment:
needs: checkCommentAlreadyExist
if: ${{ success() && needs.checkCommentAlreadyExist.outputs.hasAutoDetectionComment == 'False' }}
uses: ./.github/workflows/addComment.yaml
with:
message: |
**Hello how are you I am GitHub bot**
😀😀
I see that you changed templates under the detections/analytic rules folder. Did you remember to update the version of the templates you changed?
If not, and if you want customers to be aware that a new version of this template is available, please update the ``version`` property of the template you changed.
prNumber: "${{ github.event.pull_request.number }}"
secrets: inherit