Skip to content

Commit

Permalink
Merge branch 'Azure:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
KustoKing authored Sep 15, 2023
2 parents 99124cd + 578c106 commit 185c8b6
Show file tree
Hide file tree
Showing 464 changed files with 46,165 additions and 11,257 deletions.
36 changes: 35 additions & 1 deletion .azure-pipelines/callGithubWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ jobs:
- job: "CallGithubWorkflow"
pool:
vmImage: 'ubuntu-latest'
variables:
- group: autopackaging

# NAME OF THE JOB THAT DEPENDS
dependsOn:
Expand Down Expand Up @@ -60,7 +62,39 @@ jobs:
# NOT MAIN/MASTER OR AUTOMATED BRANCH
if ($branchName -ne 'master' -and $isAutoGeneratedPR -eq $false -and $targetBranch -eq 'master')
{
.script/package-automation/invokeGithubWorklow.ps1 $branchName $pullRequestNumber
# INVOKE GITHUB WORKFLOW
$header = @{
"Accept" = "application/vnd.github+json"
}
$githubToken = "$($env:GITHUB_TOKEN_VALUE)"
$token = $githubToken | ConvertTo-SecureString -AsPlainText -Force
$pullRequestNumberInt = [int]$pullRequestNumber
$client_payload = @{
"pullRequestBranchName" = "$branchName"
"pullRequestNumber" = $pullRequestNumberInt
}
$BodyJson = @{
"event_type" = "package-command"
"client_payload" = $client_payload
}
$jsonBody = $BodyJson | ConvertTo-Json
Write-Host "jsonBody $jsonBody"
$Parameters = @{
Method = "POST"
Uri = "https://api.github.com/repos/Azure/Azure-Sentinel/dispatches"
Headers = $header
ContentType = "application/json"
Body = $jsonBody
Authentication = "Bearer"
Token = $token
}
$result = Invoke-RestMethod @Parameters
Write-Host $result
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checkAutomatedPR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: ValidateAutomatedPR

run: |
$prBodyContent = "${{ env.BODY }}"
$prBodyContent = '${{ env.BODY }}'
$isAutomatedPR = $false
if ($prBodyContent -like '*Automation have successfully*')
{
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/package-command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ on:
types: [package-command, Package-command, PACKAGE-command]
jobs:
solutionNameDetails:
if: ${{ !github.event.pull_request.head.repo.fork }}
if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/getSolutionName.yaml
secrets: inherit

# BELOW JOB WILL CHECK IF WE NEED TO SKIP PACKAGE CREATION OR NOT
checkSkipPackagingDetails:
if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && !github.event.pull_request.head.repo.fork }}
if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/checkSkipPackagingInfo.yaml
secrets: inherit
needs: solutionNameDetails
Expand All @@ -34,7 +34,7 @@ jobs:
neworexistingsolution:
needs: [solutionNameDetails, checkSkipPackagingDetails]
uses: ./.github/workflows/neworexistingsolution.yaml
if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }}
if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }}
with:
solutionName: "${{ needs.solutionNameDetails.outputs.solutionName }}"
secrets: inherit
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package-on-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ on:
- closed
jobs:
checkAutomatedPR:
if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }}
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/checkAutomatedPR.yaml

solutionNameDetails:
if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }}
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }}
needs: checkAutomatedPR
uses: ./.github/workflows/getSolutionName.yaml
secrets: inherit

checkSkipPackagingDetails:
if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork && needs.solutionNameDetails.outputs.solutionName != '' }}
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork && needs.solutionNameDetails.outputs.solutionName != '' }}
uses: ./.github/workflows/checkSkipPackagingInfo.yaml
secrets: inherit
needs: solutionNameDetails
Expand All @@ -41,7 +41,7 @@ jobs:
neworexistingsolution:
needs: [solutionNameDetails, checkSkipPackagingDetails]
uses: ./.github/workflows/neworexistingsolution.yaml
if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }}
if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }}
with:
solutionName: "${{ needs.solutionNameDetails.outputs.solutionName }}"
secrets: inherit
Expand Down
34 changes: 0 additions & 34 deletions .script/package-automation/invokeGithubWorklow.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
{
"name": "Type",
"type": "String"
},
{
"name": "PerformedByDisplayName",
"type": "String"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"Name": "DataminrPulseAlerts",
"Properties": [
{
"Name": "TimeGenerated",
"Type": "datetime"
},
{
"Name": "EventVendor",
"Type": "string"
},
{
"Name": "EventProduct",
"Type": "string"
},
{
"Name": "AlertId",
"Type": "string"
},
{
"Name": "AlertType",
"Type": "string"
},
{
"Name": "AvailableRelatedAlerts",
"Type": "real"
},
{
"Name": "Caption",
"Type": "string"
},
{
"Name": "Company",
"Type": "string"
},
{
"Name": "CompanyNames",
"Type": "string"
},
{
"Name": "Category",
"Type": "string"
},
{
"Name": "CategoryNames",
"Type": "string"
},
{
"Name": "Latitude",
"Type": "real"
},
{
"Name": "Longitude",
"Type": "real"
},
{
"Name": "EventLocationName",
"Type": "string"
},
{
"Name": "EventLocationPlace",
"Type": "string"
},
{
"Name": "EventLocationProbability",
"Type": "real"
},
{
"Name": "EventLocationRadius",
"Type": "real"
},
{
"Name": "EventSource",
"Type": "string"
},
{
"Name": "EventTime",
"Type": "real"
},
{
"Name": "EventVolume",
"Type": "real"
},
{
"Name": "EmbeddedLabels",
"Type": "string"
},
{
"Name": "PostLanguagae",
"Type": "string"
},
{
"Name": "PostLink",
"Type": "string"
},
{
"Name": "PostMedia",
"Type": "string"
},
{
"Name": "PostText",
"Type": "string"
},
{
"Name": "PostTimestamp",
"Type": "real"
},
{
"Name": "PostTranslatedText",
"Type": "string"
},
{
"Name": "PublisherCategoryName",
"Type": "string"
},
{
"Name": "RelatedTerms",
"Type": "string"
},
{
"Name": "Sectors",
"Type": "string"
},
{
"Name": "SourceChannels",
"Type": "string"
},
{
"Name": "SourceDisplayName",
"Type": "string"
},
{
"Name": "SourceEntityName",
"Type": "string"
},
{
"Name": "SourceLink",
"Type": "string"
},
{
"Name": "SourceVerified",
"Type": "string"
},
{
"Name": "SubCaptionBulletsContent",
"Type": "string"
},
{
"Name": "SubCaptionBulletsMedia",
"Type": "string"
},
{
"Name": "SubCaptionBulletsSource",
"Type": "string"
},
{
"Name": "WatchlistsMatchedByType",
"Type": "string"
},
{
"Name": "WatchlistNames",
"Type": "string"
}
]
}
Loading

0 comments on commit 185c8b6

Please sign in to comment.