From 912b58d5f512c6a47c7fa6a85eeefcd97b8a6337 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 10:19:31 -0600 Subject: [PATCH 01/27] First test run --- .../msgraph-reference-generation.yml | 72 +++++++++---------- .../scripts/process-all-schemas.ps1 | 8 +-- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index c89aab25..9e417fbd 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -123,42 +123,40 @@ extends: git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" displayName: 'Git: set user config' - # Copy files from the tmp folder to the checkout repo - - task: CopyFiles@2 - inputs: - sourceFolder: '$(Build.SourcesDirectory)/tmp_lib' - contents: '**/*' - targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' - overwrite: true - displayName: Copy OpenAPI files to local typespec-msgraph repo - # Push changes to Typespec msgraph repo - - pwsh: '$(scriptsDirectory)/git-push-reference-files.ps1' - displayName: Publish new generated files to msgraph-metadata repo - env: - PublishChanges: True - workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' - enabled: true + # # Copy files from the tmp folder to the checkout repo + # - task: CopyFiles@2 + # inputs: + # sourceFolder: '$(Build.SourcesDirectory)/tmp_lib' + # contents: '**/*' + # targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' + # overwrite: true + # displayName: Copy OpenAPI files to local typespec-msgraph repo + # # Push changes to Typespec msgraph repo + # - pwsh: '$(scriptsDirectory)/git-push-reference-files.ps1' + # displayName: Publish new generated files to msgraph-metadata repo + # env: + # PublishChanges: True + # workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' + # enabled: true - # Create PR - - task: AzureKeyVault@2 - displayName: "Azure Key Vault: Get Secrets" - inputs: - azureSubscription: "Federated AKV Managed Identity Connection" - KeyVaultName: akv-prod-eastus - SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - - - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' - displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' - env: - BaseBranch: main - GeneratePullRequest: true - GhAppId: $(microsoft-graph-devx-bot-appid) - GhAppKey: $(microsoft-graph-devx-bot-privatekey) - OverrideSkipCI: false - RepoName: 'microsoftgraph/typespec-msgraph' - ScriptsDirectory: $(scriptsDirectory) - # Version is intentionally left empty for OpenAPI PRs as versioning is not applicable in this context. - Version: '' - workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' - + # # Create PR + # - task: AzureKeyVault@2 + # displayName: "Azure Key Vault: Get Secrets" + # inputs: + # azureSubscription: "Federated AKV Managed Identity Connection" + # KeyVaultName: akv-prod-eastus + # SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" + # - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' + # displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' + # env: + # BaseBranch: main + # GeneratePullRequest: true + # GhAppId: $(microsoft-graph-devx-bot-appid) + # GhAppKey: $(microsoft-graph-devx-bot-privatekey) + # OverrideSkipCI: false + # RepoName: 'microsoftgraph/typespec-msgraph' + # ScriptsDirectory: $(scriptsDirectory) + # # Version is intentionally left empty for OpenAPI PRs as versioning is not applicable in this context. + # Version: '' + # workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' diff --git a/.azure-pipelines/scripts/process-all-schemas.ps1 b/.azure-pipelines/scripts/process-all-schemas.ps1 index 5ac11eb6..bf8e5f4a 100644 --- a/.azure-pipelines/scripts/process-all-schemas.ps1 +++ b/.azure-pipelines/scripts/process-all-schemas.ps1 @@ -23,8 +23,8 @@ $environments = @( # Process beta files Write-Host "Processing beta CSDL files..." -ForegroundColor Cyan foreach ($env in $environments) { - $csdlFile = "../../schemas/beta-$env.csdl" - $outputDir = "../../generated-lib/$env/Beta/" + $csdlFile = "./schemas/beta-$env.csdl" + $outputDir = "./generated-lib/$env/Beta/" if (Test-Path $csdlFile) { Write-Host "Processing $csdlFile -> $outputDir" -ForegroundColor Green @@ -42,8 +42,8 @@ foreach ($env in $environments) { # Process v1.0 files Write-Host "`nProcessing v1.0 CSDL files..." -ForegroundColor Cyan foreach ($env in $environments) { - $csdlFile = "../../schemas/v1.0-$env.csdl" - $outputDir = "../../generated-lib/$env/V1.0/" + $csdlFile = "./schemas/v1.0-$env.csdl" + $outputDir = "./generated-lib/$env/V1.0/" if (Test-Path $csdlFile) { Write-Host "Processing $csdlFile -> $outputDir" -ForegroundColor Green From 33168f364e180cffc0caec4b1439e61ad6483198 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 10:21:22 -0600 Subject: [PATCH 02/27] adding missing repo --- .azure-pipelines/msgraph-reference-generation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 9e417fbd..a1521464 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -19,6 +19,10 @@ resources: - repository: typespec-msgraph-reference type: git name: typespec-msgraph-reference + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release variables: BuildConfiguration: 'Release' scriptsDirectory: '$(Build.SourcesDirectory)\.azure-pipelines\scripts' From 16dd713fcb0a4b5664047c4b81b2826e89242264 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 10:24:09 -0600 Subject: [PATCH 03/27] skip scan repos --- .azure-pipelines/msgraph-reference-generation.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index a1521464..46a75e5d 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -30,6 +30,11 @@ variables: extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: + sdl: + sourceRepositoriesToScan: + exclude: + - repository: typespec-msgraph + - repository: typespec-msgraph-reference pool: name: Azure-Pipelines-1ESPT-ExDShared vmImage: windows-latest From e01660a0fd8bbdf6a51a4c824fd88df7712caf36 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 10:42:07 -0600 Subject: [PATCH 04/27] updating pipeline --- .azure-pipelines/msgraph-reference-generation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 46a75e5d..3fa1fa4c 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -71,18 +71,18 @@ extends: displayName: 'Restore dependencies' inputs: command: restore - projects: '$(Build.SourcesDirectory)\typespec-msgraph-reference\typespec-msgraph-reference.sln' + projects: '$(Build.SourcesDirectory)\typespec-msgraph-reference.sln' # Build the solution - task: DotNetCoreCLI@2 displayName: 'Build solution' inputs: command: build - projects: '$(Build.SourcesDirectory)\typespec-msgraph-reference\typespec-msgraph-reference.sln' + projects: '$(Build.SourcesDirectory)\typespec-msgraph-reference.sln' arguments: '--configuration $(BuildConfiguration) --no-incremental' - task: CopyFiles@2 inputs: - sourceFolder: '$(Build.SourcesDirectory)/typespec-msgraph-reference/bin/$(BuildConfiguration)/net10.0' + sourceFolder: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/net10.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy Typespec Reference executable From 41e91c10fa7c7c73024748e75f0bfc9c4214db87 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 10:54:12 -0600 Subject: [PATCH 05/27] updating network isolation --- .azure-pipelines/msgraph-reference-generation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 3fa1fa4c..0a5b246a 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -30,6 +30,8 @@ variables: extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: + settings: + networkIsolationPolicy: Permissive sdl: sourceRepositoriesToScan: exclude: From 789a482f6d6aaff5a2e4f705ba3005c42ac3158b Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 11:17:05 -0600 Subject: [PATCH 06/27] updating command --- .azure-pipelines/msgraph-reference-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 0a5b246a..c4612548 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -107,7 +107,7 @@ extends: - checkout: self # Add this to checkout msgraph-metadata repo displayName: checkout msgraph-metadata fetchDepth: 1 - - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/process-all-schemas.ps1 -ExecPath $(Build.SourcesDirectory)/typespec-reference-tool/typespec-msgraph-reference.exe' + - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/process-all-schemas.ps1 -ExePath $(Build.SourcesDirectory)/typespec-reference-tool/typespec-msgraph-reference.exe' displayName: "Process all the valid schemas files" - task: CopyFiles@2 inputs: From 11ce1f319e1a1c283d7b7ca6efb0c06c0adcc270 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 11:33:06 -0600 Subject: [PATCH 07/27] verify executable path --- .azure-pipelines/scripts/process-all-schemas.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.azure-pipelines/scripts/process-all-schemas.ps1 b/.azure-pipelines/scripts/process-all-schemas.ps1 index bf8e5f4a..d7cb9009 100644 --- a/.azure-pipelines/scripts/process-all-schemas.ps1 +++ b/.azure-pipelines/scripts/process-all-schemas.ps1 @@ -8,6 +8,17 @@ param( $ErrorActionPreference = "Stop" +# Normalize path separators for Windows +$ExePath = $ExePath -replace '/', '\' + +# Validate that the executable exists +if (-not (Test-Path $ExePath)) { + Write-Host "Error: Executable not found at path: $ExePath" -ForegroundColor Red + exit 1 +} + +Write-Host "Using executable: $ExePath" -ForegroundColor Cyan + # Define the environments $environments = @( "Bleu", From 21aae0161a0baf6c13b7d55777f5faf5eaa92a92 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 11:57:35 -0600 Subject: [PATCH 08/27] debuggin artifact --- .../msgraph-reference-generation.yml | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index c4612548..036331fd 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -97,8 +97,8 @@ extends: inputs: - input: pipelineArtifact buildType: 'current' - artifactName: 'typespec-reference-tool' - targetPath: '$(Build.SourcesDirectory)/typespec-reference-tool' + artifactName: typespec-reference-tool + targetPath: '$(Build.SourcesDirectory)/typespecReferenceTool' outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/lib' @@ -107,7 +107,30 @@ extends: - checkout: self # Add this to checkout msgraph-metadata repo displayName: checkout msgraph-metadata fetchDepth: 1 - - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/process-all-schemas.ps1 -ExePath $(Build.SourcesDirectory)/typespec-reference-tool/typespec-msgraph-reference.exe' + - pwsh: | + Write-Host "Validating artifact download..." -ForegroundColor Cyan + $artifactPath = "$(Build.SourcesDirectory)/typespecReferenceTool" + $exePath = "$artifactPath/typespec-msgraph-reference.exe" + + if (Test-Path $artifactPath) { + Write-Host "✓ Artifact path exists: $artifactPath" -ForegroundColor Green + Write-Host "`nFolder structure:" -ForegroundColor Cyan + Get-ChildItem -Path $artifactPath -Recurse | Select-Object FullName + } else { + Write-Host "✗ Artifact path NOT found: $artifactPath" -ForegroundColor Red + Get-ChildItem -Path '$(Build.SourcesDirectory)' -Recurse | Select-Object FullName + exit 1 + } + + if (Test-Path $exePath) { + Write-Host "`n✓ Executable found: $exePath" -ForegroundColor Green + } else { + Write-Host "`n✗ Executable NOT found: $exePath" -ForegroundColor Red + Write-Host "Expected location: $exePath" -ForegroundColor Yellow + exit 1 + } + displayName: "Validate artifact and list contents" + - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/process-all-schemas.ps1 -ExePath $(Build.SourcesDirectory)/typespecReferenceTool/typespec-msgraph-reference.exe' displayName: "Process all the valid schemas files" - task: CopyFiles@2 inputs: From 00b9160f0c59c5f36615b0d0eef8ef9606c3678e Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 12:19:46 -0600 Subject: [PATCH 09/27] Checking for folder override --- .azure-pipelines/msgraph-reference-generation.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 036331fd..d3e51162 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -98,7 +98,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: typespec-reference-tool - targetPath: '$(Build.SourcesDirectory)/typespecReferenceTool' + targetPath: '$(Build.ArtifactStagingDirectory)/typespecReferenceTool' outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/lib' @@ -107,6 +107,11 @@ extends: - checkout: self # Add this to checkout msgraph-metadata repo displayName: checkout msgraph-metadata fetchDepth: 1 + - task: CopyFiles@2 + inputs: + sourceFolder: $(Build.ArtifactStagingDirectory)/typespecReferenceTool + contents: '**/*' + targetFolder: '$(Build.SourcesDirectory)/typespecReferenceTool' - pwsh: | Write-Host "Validating artifact download..." -ForegroundColor Cyan $artifactPath = "$(Build.SourcesDirectory)/typespecReferenceTool" @@ -119,6 +124,7 @@ extends: } else { Write-Host "✗ Artifact path NOT found: $artifactPath" -ForegroundColor Red Get-ChildItem -Path '$(Build.SourcesDirectory)' -Recurse | Select-Object FullName + Get-ChildItem -Path '$(Build.ArtifactStagingDirectory)' -Recurse | Select-Object FullName exit 1 } From d44cb148b198b8a908966d4f16b73641df33a96a Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 12:46:15 -0600 Subject: [PATCH 10/27] updating exit code --- .azure-pipelines/scripts/process-all-schemas.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/scripts/process-all-schemas.ps1 b/.azure-pipelines/scripts/process-all-schemas.ps1 index d7cb9009..1a04e07d 100644 --- a/.azure-pipelines/scripts/process-all-schemas.ps1 +++ b/.azure-pipelines/scripts/process-all-schemas.ps1 @@ -70,3 +70,4 @@ foreach ($env in $environments) { } Write-Host "`nAll CSDL files processed successfully!" -ForegroundColor Green +exit 0 From 84949b101145bdb6fae79cf963c683c33819cd14 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 14:17:53 -0600 Subject: [PATCH 11/27] Testing PR updates --- .../msgraph-reference-generation.yml | 96 +++++++------------ .../scripts/create-pull-request.ps1 | 2 +- 2 files changed, 38 insertions(+), 60 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index d3e51162..bfb44e77 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -1,5 +1,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # contains an end to end validation pipeline using C# compilation tests for staging beta metadata +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) trigger: branches: include: @@ -112,29 +113,6 @@ extends: sourceFolder: $(Build.ArtifactStagingDirectory)/typespecReferenceTool contents: '**/*' targetFolder: '$(Build.SourcesDirectory)/typespecReferenceTool' - - pwsh: | - Write-Host "Validating artifact download..." -ForegroundColor Cyan - $artifactPath = "$(Build.SourcesDirectory)/typespecReferenceTool" - $exePath = "$artifactPath/typespec-msgraph-reference.exe" - - if (Test-Path $artifactPath) { - Write-Host "✓ Artifact path exists: $artifactPath" -ForegroundColor Green - Write-Host "`nFolder structure:" -ForegroundColor Cyan - Get-ChildItem -Path $artifactPath -Recurse | Select-Object FullName - } else { - Write-Host "✗ Artifact path NOT found: $artifactPath" -ForegroundColor Red - Get-ChildItem -Path '$(Build.SourcesDirectory)' -Recurse | Select-Object FullName - Get-ChildItem -Path '$(Build.ArtifactStagingDirectory)' -Recurse | Select-Object FullName - exit 1 - } - - if (Test-Path $exePath) { - Write-Host "`n✓ Executable found: $exePath" -ForegroundColor Green - } else { - Write-Host "`n✗ Executable NOT found: $exePath" -ForegroundColor Red - Write-Host "Expected location: $exePath" -ForegroundColor Yellow - exit 1 - } displayName: "Validate artifact and list contents" - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/process-all-schemas.ps1 -ExePath $(Build.SourcesDirectory)/typespecReferenceTool/typespec-msgraph-reference.exe' displayName: "Process all the valid schemas files" @@ -153,7 +131,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'referenceLibrary' - targetPath: '$(Build.SourcesDirectory)/tmp_lib' + targetPath: '$(Build.ArtifactStagingDirectory)/tmp_lib' steps: - checkout: typespec-msgraph displayName: checkout typespec-msgraph @@ -163,40 +141,40 @@ extends: git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" displayName: 'Git: set user config' - # # Copy files from the tmp folder to the checkout repo - # - task: CopyFiles@2 - # inputs: - # sourceFolder: '$(Build.SourcesDirectory)/tmp_lib' - # contents: '**/*' - # targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' - # overwrite: true - # displayName: Copy OpenAPI files to local typespec-msgraph repo - # # Push changes to Typespec msgraph repo - # - pwsh: '$(scriptsDirectory)/git-push-reference-files.ps1' - # displayName: Publish new generated files to msgraph-metadata repo - # env: - # PublishChanges: True - # workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' - # enabled: true + # Copy files from the tmp folder to the checkout repo + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' + contents: '**/*' + targetFolder: '$(Build.SourcesDirectory)/packages/typespec-reference-library/lib' + overwrite: true + displayName: Copy OpenAPI files to local typespec-msgraph repo + # Push changes to Typespec msgraph repo + - pwsh: '$(scriptsDirectory)/git-push-reference-files.ps1' + displayName: Publish new generated files to msgraph-metadata repo + env: + PublishChanges: True + workingDirectory: '$(Build.SourcesDirectory)' + enabled: true - # # Create PR - # - task: AzureKeyVault@2 - # displayName: "Azure Key Vault: Get Secrets" - # inputs: - # azureSubscription: "Federated AKV Managed Identity Connection" - # KeyVaultName: akv-prod-eastus - # SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" + # Create PR + - task: AzureKeyVault@2 + displayName: "Azure Key Vault: Get Secrets" + inputs: + azureSubscription: "Federated AKV Managed Identity Connection" + KeyVaultName: akv-prod-eastus + SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - # - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' - # displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' - # env: - # BaseBranch: main - # GeneratePullRequest: true - # GhAppId: $(microsoft-graph-devx-bot-appid) - # GhAppKey: $(microsoft-graph-devx-bot-privatekey) - # OverrideSkipCI: false - # RepoName: 'microsoftgraph/typespec-msgraph' - # ScriptsDirectory: $(scriptsDirectory) - # # Version is intentionally left empty for OpenAPI PRs as versioning is not applicable in this context. - # Version: '' - # workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' + - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' + displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' + env: + BaseBranch: main + GeneratePullRequest: true + GhAppId: $(microsoft-graph-devx-bot-appid) + GhAppKey: $(microsoft-graph-devx-bot-privatekey) + OverrideSkipCI: false + RepoName: 'microsoftgraph/typespec-msgraph' + ScriptsDirectory: $(scriptsDirectory) + # Adding date as Version to keep up with the schema sync PRs. + Date: '$(Date:yyyyMMdd)' + workingDirectory: '$(Build.SourcesDirectory)' diff --git a/.azure-pipelines/scripts/create-pull-request.ps1 b/.azure-pipelines/scripts/create-pull-request.ps1 index 95279441..14c77249 100644 --- a/.azure-pipelines/scripts/create-pull-request.ps1 +++ b/.azure-pipelines/scripts/create-pull-request.ps1 @@ -4,7 +4,7 @@ if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this return; } -$title = "Generated $env:Version typespec reference files" +$title = "Generated typespec reference files on $env:Date" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." From 41f5703fe23b8e68c5b87828c85b27a5e1b9c9a8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 14:20:46 -0600 Subject: [PATCH 12/27] Adding dummy file test --- .azure-pipelines/msgraph-reference-generation.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index bfb44e77..b0634b8a 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -140,8 +140,13 @@ extends: - pwsh: | git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" - displayName: 'Git: set user config' - # Copy files from the tmp folder to the checkout repo + displayName: 'Git: set user config' + - pwsh: | + $dummyFilePath = "$(Build.SourcesDirectory)/test-pr-generation.txt" + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + "This is a test file created at $timestamp to verify PR generation" | Out-File -FilePath $dummyFilePath -Encoding UTF8 + Write-Host "Created dummy file at: $dummyFilePath" -ForegroundColor Green + displayName: 'Create dummy test file' # Copy files from the tmp folder to the checkout repo - task: CopyFiles@2 inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' From ff9093ad0929d0b3157690ff2ad30db34c8f9fdc Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 14:51:06 -0600 Subject: [PATCH 13/27] adding subdirectory --- .azure-pipelines/msgraph-reference-generation.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index b0634b8a..4561abe7 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -133,8 +133,12 @@ extends: artifactName: 'referenceLibrary' targetPath: '$(Build.ArtifactStagingDirectory)/tmp_lib' steps: + - checkout: self # Add this to checkout msgraph-metadata repo + displayName: checkout msgraph-metadata + fetchDepth: 1 - checkout: typespec-msgraph displayName: checkout typespec-msgraph + path: typespec-msgraph fetchDepth: 1 persistCredentials: true - pwsh: | @@ -142,7 +146,7 @@ extends: git config --global user.name "Microsoft Graph DevX Tooling" displayName: 'Git: set user config' - pwsh: | - $dummyFilePath = "$(Build.SourcesDirectory)/test-pr-generation.txt" + $dummyFilePath = "$(Build.SourcesDirectory)/typespec-msgraph/test-pr-generation.txt" $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" "This is a test file created at $timestamp to verify PR generation" | Out-File -FilePath $dummyFilePath -Encoding UTF8 Write-Host "Created dummy file at: $dummyFilePath" -ForegroundColor Green @@ -151,7 +155,7 @@ extends: inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' contents: '**/*' - targetFolder: '$(Build.SourcesDirectory)/packages/typespec-reference-library/lib' + targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' overwrite: true displayName: Copy OpenAPI files to local typespec-msgraph repo # Push changes to Typespec msgraph repo @@ -159,7 +163,7 @@ extends: displayName: Publish new generated files to msgraph-metadata repo env: PublishChanges: True - workingDirectory: '$(Build.SourcesDirectory)' + workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' enabled: true # Create PR @@ -182,4 +186,4 @@ extends: ScriptsDirectory: $(scriptsDirectory) # Adding date as Version to keep up with the schema sync PRs. Date: '$(Date:yyyyMMdd)' - workingDirectory: '$(Build.SourcesDirectory)' + workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' From 8f92c08fad757386713cb80d870e0d34008c0288 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 15:23:12 -0600 Subject: [PATCH 14/27] Fix path --- .azure-pipelines/msgraph-reference-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 4561abe7..10597f58 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -138,7 +138,7 @@ extends: fetchDepth: 1 - checkout: typespec-msgraph displayName: checkout typespec-msgraph - path: typespec-msgraph + path: '$(Build.SourcesDirectory)/typespec-msgraph' fetchDepth: 1 persistCredentials: true - pwsh: | From 586c31309eeea5c4640e34200fd2c750f33f891f Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 15:57:04 -0600 Subject: [PATCH 15/27] Fixing directory issue --- .azure-pipelines/msgraph-reference-generation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 10597f58..75d9d170 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -138,7 +138,6 @@ extends: fetchDepth: 1 - checkout: typespec-msgraph displayName: checkout typespec-msgraph - path: '$(Build.SourcesDirectory)/typespec-msgraph' fetchDepth: 1 persistCredentials: true - pwsh: | From 9fa26254b84511b524e342c43fc5e3b1fc856752 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 5 Feb 2026 16:33:06 -0600 Subject: [PATCH 16/27] Testing new scripts directory --- .azure-pipelines/msgraph-reference-generation.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 75d9d170..19845376 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -135,6 +135,7 @@ extends: steps: - checkout: self # Add this to checkout msgraph-metadata repo displayName: checkout msgraph-metadata + path: msgraph-metadata fetchDepth: 1 - checkout: typespec-msgraph displayName: checkout typespec-msgraph @@ -158,7 +159,7 @@ extends: overwrite: true displayName: Copy OpenAPI files to local typespec-msgraph repo # Push changes to Typespec msgraph repo - - pwsh: '$(scriptsDirectory)/git-push-reference-files.ps1' + - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1' displayName: Publish new generated files to msgraph-metadata repo env: PublishChanges: True @@ -173,7 +174,7 @@ extends: KeyVaultName: akv-prod-eastus SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' + - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/create-pull-request.ps1' displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' env: BaseBranch: main @@ -182,7 +183,7 @@ extends: GhAppKey: $(microsoft-graph-devx-bot-privatekey) OverrideSkipCI: false RepoName: 'microsoftgraph/typespec-msgraph' - ScriptsDirectory: $(scriptsDirectory) + ScriptsDirectory: $(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts # Adding date as Version to keep up with the schema sync PRs. Date: '$(Date:yyyyMMdd)' workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' From 73ee76e996c16e78cf378753e28e765d5f876201 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 08:15:37 -0600 Subject: [PATCH 17/27] Testing scripts path --- .../msgraph-reference-generation.yml | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 19845376..5b2a57b2 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -158,12 +158,35 @@ extends: targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' overwrite: true displayName: Copy OpenAPI files to local typespec-msgraph repo + # Verify script paths + - pwsh: | + Write-Host "Checking for git-push-reference-files.ps1 script..." -ForegroundColor Cyan + + $path1 = "$(Build.SourcesDirectory)/.azure-pipelines/scripts/git-push-reference-files.ps1" + $path2 = "$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1" + + Write-Host "`nListing SourcesDirectory contents:" -ForegroundColor Yellow + Get-ChildItem -Path "$(Build.SourcesDirectory)" | Select-Object Name, FullName + + Write-Host "`nChecking Path 1: $path1" -ForegroundColor Yellow + if (Test-Path $path1) { + Write-Host "✓ Found at: $path1" -ForegroundColor Green + } else { + Write-Host "✗ Not found at: $path1" -ForegroundColor Red + } + + Write-Host "`nChecking Path 2: $path2" -ForegroundColor Yellow + if (Test-Path $path2) { + Write-Host "✓ Found at: $path2" -ForegroundColor Green + } else { + Write-Host "✗ Not found at: $path2" -ForegroundColor Red + } + displayName: Verify script paths # Push changes to Typespec msgraph repo - - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1' + - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/git-push-reference-files.ps1' displayName: Publish new generated files to msgraph-metadata repo env: PublishChanges: True - workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' enabled: true # Create PR From 074239a2414f6f90c25fd917f78e43247726a05f Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 08:51:20 -0600 Subject: [PATCH 18/27] Testing without path --- .azure-pipelines/msgraph-reference-generation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 5b2a57b2..c9129a35 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -135,7 +135,6 @@ extends: steps: - checkout: self # Add this to checkout msgraph-metadata repo displayName: checkout msgraph-metadata - path: msgraph-metadata fetchDepth: 1 - checkout: typespec-msgraph displayName: checkout typespec-msgraph From e030fd002cf5242a9a0e5ef1adc626f98d690e36 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 09:21:05 -0600 Subject: [PATCH 19/27] fixing path --- .azure-pipelines/msgraph-reference-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index c9129a35..69acce37 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -182,7 +182,7 @@ extends: } displayName: Verify script paths # Push changes to Typespec msgraph repo - - pwsh: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/git-push-reference-files.ps1' + - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1' displayName: Publish new generated files to msgraph-metadata repo env: PublishChanges: True From 114f93d59c0d13b0247c2a3e6dbe34c1bae8dac7 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 09:56:18 -0600 Subject: [PATCH 20/27] Adding missing working directory --- .azure-pipelines/msgraph-reference-generation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 69acce37..f33eeb55 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -187,6 +187,7 @@ extends: env: PublishChanges: True enabled: true + workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' # Create PR - task: AzureKeyVault@2 From 04df0e0939646d28a1f53de4b467dae9c4127b9b Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 10:19:32 -0600 Subject: [PATCH 21/27] updating scripts dir --- .azure-pipelines/msgraph-reference-generation.yml | 2 +- .azure-pipelines/scripts/create-pull-request.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index f33eeb55..0a79bbe1 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -206,7 +206,7 @@ extends: GhAppKey: $(microsoft-graph-devx-bot-privatekey) OverrideSkipCI: false RepoName: 'microsoftgraph/typespec-msgraph' - ScriptsDirectory: $(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts + scriptDir: $(Build.SourcesDirectory)\msgraph-metadata\.azure-pipelines\scripts # Adding date as Version to keep up with the schema sync PRs. Date: '$(Date:yyyyMMdd)' workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' diff --git a/.azure-pipelines/scripts/create-pull-request.ps1 b/.azure-pipelines/scripts/create-pull-request.ps1 index 14c77249..3000c689 100644 --- a/.azure-pipelines/scripts/create-pull-request.ps1 +++ b/.azure-pipelines/scripts/create-pull-request.ps1 @@ -10,7 +10,7 @@ $title = "Generated typespec reference files on $env:Date" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." # The installed application is required to have the following permissions: read/write on pull requests/ -$tokenGenerationScript = "$env:ScriptsDirectory\Generate-Github-Token.ps1" +$tokenGenerationScript = "$env:scriptDir\Generate-Github-Token.ps1" $env:GITHUB_TOKEN = & $tokenGenerationScript -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository $env:RepoName Write-Host "Fetched Github Token for PR generation and set as environment variable." From 1caf597e524b8ad83cf6c9c2cfd46dea0c6ddbfc Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 12:59:18 -0600 Subject: [PATCH 22/27] removing debug step --- .../msgraph-reference-generation.yml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 0a79bbe1..5f17a48d 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -157,30 +157,6 @@ extends: targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' overwrite: true displayName: Copy OpenAPI files to local typespec-msgraph repo - # Verify script paths - - pwsh: | - Write-Host "Checking for git-push-reference-files.ps1 script..." -ForegroundColor Cyan - - $path1 = "$(Build.SourcesDirectory)/.azure-pipelines/scripts/git-push-reference-files.ps1" - $path2 = "$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1" - - Write-Host "`nListing SourcesDirectory contents:" -ForegroundColor Yellow - Get-ChildItem -Path "$(Build.SourcesDirectory)" | Select-Object Name, FullName - - Write-Host "`nChecking Path 1: $path1" -ForegroundColor Yellow - if (Test-Path $path1) { - Write-Host "✓ Found at: $path1" -ForegroundColor Green - } else { - Write-Host "✗ Not found at: $path1" -ForegroundColor Red - } - - Write-Host "`nChecking Path 2: $path2" -ForegroundColor Yellow - if (Test-Path $path2) { - Write-Host "✓ Found at: $path2" -ForegroundColor Green - } else { - Write-Host "✗ Not found at: $path2" -ForegroundColor Red - } - displayName: Verify script paths # Push changes to Typespec msgraph repo - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1' displayName: Publish new generated files to msgraph-metadata repo From 8abc8c87d9139e271a2aa0d547bed7066034c7d3 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 14:00:11 -0600 Subject: [PATCH 23/27] updating copy of files --- .azure-pipelines/msgraph-reference-generation.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 5f17a48d..64cf7c96 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -154,9 +154,19 @@ extends: inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' contents: '**/*' - targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-reference-library/lib' + targetFolder: '$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-msgraph-reference/lib' overwrite: true displayName: Copy OpenAPI files to local typespec-msgraph repo + - pwsh: | + $manifestPath = "$(Build.SourcesDirectory)/typespec-msgraph/packages/typespec-msgraph-reference/lib/_manifest" + if (Test-Path $manifestPath) { + Write-Host "Deleting _manifest folder: $manifestPath" -ForegroundColor Yellow + Remove-Item -Path $manifestPath -Recurse -Force + Write-Host "_manifest folder deleted successfully" -ForegroundColor Green + } else { + Write-Host "_manifest folder not found, skipping deletion" -ForegroundColor Cyan + } + displayName: 'Delete _manifest folder' # Push changes to Typespec msgraph repo - pwsh: '$(Build.SourcesDirectory)/msgraph-metadata/.azure-pipelines/scripts/git-push-reference-files.ps1' displayName: Publish new generated files to msgraph-metadata repo @@ -184,5 +194,5 @@ extends: RepoName: 'microsoftgraph/typespec-msgraph' scriptDir: $(Build.SourcesDirectory)\msgraph-metadata\.azure-pipelines\scripts # Adding date as Version to keep up with the schema sync PRs. - Date: '$(Date:yyyyMMdd)' + Date: $(Get-Date -Format "yyyy-MM-dd") workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' From 23e0dfcd77ca0549573e22dba111e4ee7aa8f4bb Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 14:32:06 -0600 Subject: [PATCH 24/27] Fixing date as version --- .azure-pipelines/msgraph-reference-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 64cf7c96..2104e4f6 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -194,5 +194,5 @@ extends: RepoName: 'microsoftgraph/typespec-msgraph' scriptDir: $(Build.SourcesDirectory)\msgraph-metadata\.azure-pipelines\scripts # Adding date as Version to keep up with the schema sync PRs. - Date: $(Get-Date -Format "yyyy-MM-dd") + Date: $[format('{0:yyyy-MM-dd}', pipeline.startTime)] workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' From 5c4ba7a301cb87c8de0d542c0be19c4a1a749fda Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 15:08:30 -0600 Subject: [PATCH 25/27] last attempt to ge t the date --- .azure-pipelines/msgraph-reference-generation.yml | 11 +++-------- .azure-pipelines/scripts/create-pull-request.ps1 | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 2104e4f6..2cc32e6e 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -27,6 +27,7 @@ resources: variables: BuildConfiguration: 'Release' scriptsDirectory: '$(Build.SourcesDirectory)\.azure-pipelines\scripts' + currentDate: $(Date:yyyyMMdd) extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates @@ -143,13 +144,7 @@ extends: - pwsh: | git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" - displayName: 'Git: set user config' - - pwsh: | - $dummyFilePath = "$(Build.SourcesDirectory)/typespec-msgraph/test-pr-generation.txt" - $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" - "This is a test file created at $timestamp to verify PR generation" | Out-File -FilePath $dummyFilePath -Encoding UTF8 - Write-Host "Created dummy file at: $dummyFilePath" -ForegroundColor Green - displayName: 'Create dummy test file' # Copy files from the tmp folder to the checkout repo + displayName: 'Git: set user config' - task: CopyFiles@2 inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' @@ -194,5 +189,5 @@ extends: RepoName: 'microsoftgraph/typespec-msgraph' scriptDir: $(Build.SourcesDirectory)\msgraph-metadata\.azure-pipelines\scripts # Adding date as Version to keep up with the schema sync PRs. - Date: $[format('{0:yyyy-MM-dd}', pipeline.startTime)] + Date: $(currentDate) workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' diff --git a/.azure-pipelines/scripts/create-pull-request.ps1 b/.azure-pipelines/scripts/create-pull-request.ps1 index 3000c689..1ee06100 100644 --- a/.azure-pipelines/scripts/create-pull-request.ps1 +++ b/.azure-pipelines/scripts/create-pull-request.ps1 @@ -4,7 +4,7 @@ if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this return; } -$title = "Generated typespec reference files on $env:Date" +$title = "Chore: Update Generated typespec reference files on $env:Date" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." From 5382d274d64688601d270edb487c320e97d93cc2 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 15:12:43 -0600 Subject: [PATCH 26/27] adding test file --- .azure-pipelines/msgraph-reference-generation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 2cc32e6e..70d75ed6 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -145,6 +145,12 @@ extends: git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" displayName: 'Git: set user config' + - pwsh: | + $dummyFilePath = "$(Build.SourcesDirectory)/typespec-msgraph/test-pr-generation.txt" + $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + "This is a test file created at $timestamp to verify PR generation" | Out-File -FilePath $dummyFilePath -Encoding UTF8 + Write-Host "Created dummy file at: $dummyFilePath" -ForegroundColor Green + displayName: 'Create dummy test file' # Copy files from the tmp folder to the checkout repo - task: CopyFiles@2 inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' From 62f26cb26404d1a57efee678c460d0e021c283af Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 6 Feb 2026 15:37:46 -0600 Subject: [PATCH 27/27] removing date from title --- .azure-pipelines/msgraph-reference-generation.yml | 9 --------- .azure-pipelines/scripts/create-pull-request.ps1 | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.azure-pipelines/msgraph-reference-generation.yml b/.azure-pipelines/msgraph-reference-generation.yml index 70d75ed6..95848c3d 100644 --- a/.azure-pipelines/msgraph-reference-generation.yml +++ b/.azure-pipelines/msgraph-reference-generation.yml @@ -27,7 +27,6 @@ resources: variables: BuildConfiguration: 'Release' scriptsDirectory: '$(Build.SourcesDirectory)\.azure-pipelines\scripts' - currentDate: $(Date:yyyyMMdd) extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates @@ -145,12 +144,6 @@ extends: git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" displayName: 'Git: set user config' - - pwsh: | - $dummyFilePath = "$(Build.SourcesDirectory)/typespec-msgraph/test-pr-generation.txt" - $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" - "This is a test file created at $timestamp to verify PR generation" | Out-File -FilePath $dummyFilePath -Encoding UTF8 - Write-Host "Created dummy file at: $dummyFilePath" -ForegroundColor Green - displayName: 'Create dummy test file' # Copy files from the tmp folder to the checkout repo - task: CopyFiles@2 inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)/tmp_lib' @@ -194,6 +187,4 @@ extends: OverrideSkipCI: false RepoName: 'microsoftgraph/typespec-msgraph' scriptDir: $(Build.SourcesDirectory)\msgraph-metadata\.azure-pipelines\scripts - # Adding date as Version to keep up with the schema sync PRs. - Date: $(currentDate) workingDirectory: '$(Build.SourcesDirectory)/typespec-msgraph' diff --git a/.azure-pipelines/scripts/create-pull-request.ps1 b/.azure-pipelines/scripts/create-pull-request.ps1 index 1ee06100..04e8a518 100644 --- a/.azure-pipelines/scripts/create-pull-request.ps1 +++ b/.azure-pipelines/scripts/create-pull-request.ps1 @@ -4,7 +4,7 @@ if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this return; } -$title = "Chore: Update Generated typespec reference files on $env:Date" +$title = "Chore: Update Generated typespec reference files" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines."