From 3d241f21e101c8a7cfcc2ce755c5a2ed2394ec00 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Wed, 27 Nov 2024 15:54:13 +0530 Subject: [PATCH 1/3] Adding workflow for KQL validation --- .github/workflows/kql-validations.yaml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/kql-validations.yaml diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml new file mode 100644 index 00000000000..e43acf7abab --- /dev/null +++ b/.github/workflows/kql-validations.yaml @@ -0,0 +1,30 @@ +name: KQL Validations +run-name: KQL Validations running on ${{ github.ref_name }} +on: + pull_request_target: + types: [opened, edited, reopened, synchronize] + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + KqlValidations: + runs-on: ubuntu-latest + env: + buildConfiguration: Release + dotnetSdkVersion: 6.0.x + PRNUM: ${{ github.event.pull_request.number }} + steps: + - uses: actions/checkout@v4 + - name: Use .NET Core SDK ${{ env.dotnetSdkVersion }} + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.dotnetSdkVersion }} + - name: Run KQL Validation tests + run: dotnet test .script/tests/KqlvalidationsTests/Kqlvalidations.Tests.csproj --configuration ${{ env.buildConfiguration }} + env: + GITHUBAPPID: ${{ secrets.APPLICATION_ID }} + GITHUBAPPINSTALLATIONID: ${{ secrets.APPLICATION_INSTALLATION_ID }} + GITHUBAPPPRIVATEKEY: ${{ secrets.APPLICATION_PRIVATE_KEY }} + SYSTEM_PULLREQUEST_ISFORK: ${{ github.event.pull_request.head.repo.fork }} + \ No newline at end of file From 1e9a6a59b15293437154bbe1d1487ff371d2a862 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Wed, 27 Nov 2024 16:23:35 +0530 Subject: [PATCH 2/3] Update kql-validation.yaml Updated KQL validation text --- .github/workflows/kql-validations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml index e43acf7abab..1d0226a76b6 100644 --- a/.github/workflows/kql-validations.yaml +++ b/.github/workflows/kql-validations.yaml @@ -1,4 +1,4 @@ -name: KQL Validations +name: KQL Validation Tests run-name: KQL Validations running on ${{ github.ref_name }} on: pull_request_target: From 139a236372ea00ae087571a9dcada9883dde29ba Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Wed, 27 Nov 2024 18:40:36 +0530 Subject: [PATCH 3/3] Update kql-validations.yaml Updated pull_request_target to pull_request --- .github/workflows/kql-validations.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml index 1d0226a76b6..2e515b8433d 100644 --- a/.github/workflows/kql-validations.yaml +++ b/.github/workflows/kql-validations.yaml @@ -1,8 +1,7 @@ -name: KQL Validation Tests +name: KQL Validations run-name: KQL Validations running on ${{ github.ref_name }} on: - pull_request_target: - types: [opened, edited, reopened, synchronize] + pull_request: branches: - master # Allows to run workflow manually from the Actions tab