Skip to content

fix content type bug in RecordedFuture-ThreatMap-Importer #1707

fix content type bug in RecordedFuture-ThreatMap-Importer

fix content type bug in RecordedFuture-ThreatMap-Importer #1707

name: Add Comment on Packaged PR on Merge
on:
pull_request:
branches:
- master
paths:
- Solutions/**
types: [closed]
jobs:
if_merged:
if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/github-script@29423367f079522048aa7c63f671593b0556ffd5
id: addComment
with:
script: |
const childPRDescription = context.payload.pull_request.body
if (childPRDescription != null && childPRDescription.includes('Automation have successfully generated package'))
{
// Add comment on packaged PR i.e. child PR
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "The solution package has now been merged into master. To make this package available on the Microsoft Sentinel Content hub, review the publishing guidance [here](https://github.com/Azure/Azure-Sentinel/tree/master/Solutions#step-3--publish-your-solution)"
})
}
else
{
console.log('Skipping addition of comment as PR is not an auto generated PR!')
}