Skip to content

Commit 493ae97

Browse files
authored
Merge pull request #1103 from microsoftgraph/dev
Merge dev to main
2 parents 7442fdd + 9600b45 commit 493ae97

File tree

14 files changed

+131
-25
lines changed

14 files changed

+131
-25
lines changed

.azure-pipelines/generation-pipeline.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ stages:
497497
targetClassName: "BaseGraphServiceClient"
498498
targetNamespace: "com.Microsoft.Graph"
499499
cleanMetadataFolder: $(cleanOpenAPIFolderV1)
500-
customArguments: "-e '/me' -e '/me/**'" # Exclude /me
500+
customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
501501
languageSpecificSteps:
502502
- template: generation-templates/java-kiota.yml
503503
parameters:
@@ -526,7 +526,7 @@ stages:
526526
targetClassName: "BaseGraphServiceClient"
527527
targetNamespace: "com.Microsoft.Graph"
528528
cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
529-
customArguments: "-e '/me' -e '/me/**'" # Exclude /me
529+
customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
530530
languageSpecificSteps:
531531
- template: generation-templates/java-kiota.yml
532532
parameters:
@@ -749,6 +749,7 @@ stages:
749749
- template: generation-templates/python.yml
750750
parameters:
751751
repoName: msgraph-sdk-python
752+
baseDirectory: msgraph
752753

753754
- stage: stage_python_beta
754755
dependsOn:
@@ -770,13 +771,14 @@ stages:
770771
repoName: 'msgraph-beta-sdk-python'
771772
branchName: $(betaBranch)
772773
targetClassName: "BaseGraphServiceClient"
773-
targetNamespace: "msgraph.generated"
774+
targetNamespace: "msgraph_beta.generated"
774775
customArguments: "-b -e '/me' -e '/me/**'" # Enable backing store, Exclude me
775776
cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
776777
languageSpecificSteps:
777778
- template: generation-templates/python.yml
778779
parameters:
779780
repoName: msgraph-beta-sdk-python
781+
baseDirectory: msgraph_beta
780782

781783
- stage: stage_cli_v1_kiota
782784
dependsOn:

.azure-pipelines/generation-templates/build-and-publish-kiota.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
steps:
22
- template: use-dotnet-sdk.yml
3+
parameters:
4+
version: '8.x' # Kiota is a NET8 app
35

46
- checkout: kiota
57
displayName: checkout kiota
@@ -10,7 +12,7 @@ steps:
1012

1113
- task: CopyFiles@2
1214
inputs:
13-
sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net7.0'
15+
sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net8.0'
1416
contents: '**/*'
1517
targetFolder: '$(Build.ArtifactStagingDirectory)'
1618
displayName: Copy Kiota executable

.azure-pipelines/generation-templates/cli-kiota.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ steps:
1717
BuildConfiguration: $(buildConfiguration)
1818
OutputFullPath: $(kiotaDirectory)/output/*
1919
RepoModelsDir: $(Build.SourcesDirectory)/${{ parameters.repoName }}/src/generated/
20+
WorkspaceRootDir: $(Build.SourcesDirectory)/${{ parameters.repoName }}
2021

2122
- task: DotNetCoreCLI@2
2223
displayName: Restore packages

.azure-pipelines/generation-templates/python.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ parameters:
22
- name: repoName
33
type: string
44

5+
- name: baseDirectory
6+
type: string
7+
58
steps:
69
- pwsh: '$(scriptsDirectory)/clean-python-files.ps1'
710
displayName: 'Remove generated models and requests from the repo generated folder'
811
env:
9-
RepoModelsDir: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/msgraph/generated'
12+
RepoModelsDir: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/${{ parameters.baseDirectory }}/generated'
1013

1114
- pwsh: '$(scriptsDirectory)/copy-python-models.ps1'
1215
displayName: 'Update models'
1316
env:
1417
BuildConfiguration: $(buildConfiguration)
1518
OutputFullPath: $(kiotaDirectory)/output/*
16-
RepoModelsDir: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/msgraph/generated'
19+
RepoModelsDir: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/${{ parameters.baseDirectory }}/generated'
1720

.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ parameters:
1010
steps:
1111
- template: set-user-config.yml
1212
- template: use-dotnet-sdk.yml
13+
parameters:
14+
version: '8.x' # Kiota is a NET8 app
1315
- ${{ parameters.downloadSteps }}
1416

1517
#Download the openAPI artifacts

.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ configuration:
1010
branchProtectionRules:
1111

1212
- branchNamePattern: dev
13-
# This branch pattern applies to the following branches as of 06/12/2023 10:31:12:
13+
# This branch pattern applies to the following branches:
1414
# dev
1515

1616
# Specifies whether this branch can be deleted. boolean
@@ -30,21 +30,22 @@ configuration:
3030
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
3131
requiresCommitSignatures: false
3232
# Are conversations required to be resolved before merging? boolean
33-
requiresConversationResolution: false
33+
requiresConversationResolution: true
3434
# Are merge commits prohibited from being pushed to this branch. boolean
3535
requiresLinearHistory: false
3636
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
3737
requiredStatusChecks:
3838
- build
39+
- CodeQL
3940
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
40-
requiresStrictStatusChecks: false
41+
requiresStrictStatusChecks: true
4142
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
4243
restrictsPushes: false
4344
# Restrict who can dismiss pull request reviews. boolean
4445
restrictsReviewDismissals: false
4546

4647
- branchNamePattern: main
47-
# This branch pattern applies to the following branches as of 06/12/2023 10:31:12:
48+
# This branch pattern applies to the following branches:
4849
# main
4950

5051
# Specifies whether this branch can be deleted. boolean
@@ -64,14 +65,15 @@ configuration:
6465
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
6566
requiresCommitSignatures: false
6667
# Are conversations required to be resolved before merging? boolean
67-
requiresConversationResolution: false
68+
requiresConversationResolution: true
6869
# Are merge commits prohibited from being pushed to this branch. boolean
6970
requiresLinearHistory: false
7071
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
7172
requiredStatusChecks:
7273
- build
73-
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
74-
requiresStrictStatusChecks: false
74+
- CodeQL
75+
# Require branches to be up to date before merging. boolean
76+
requiresStrictStatusChecks: true
7577
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
7678
restrictsPushes: false
7779
# Restrict who can dismiss pull request reviews. boolean

.github/workflows/codeql.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "dev", "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "dev" ]
20+
schedule:
21+
- cron: '1 * * * 1' # At minute 0 on Monday
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners
30+
# Consider using larger runners for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
33+
permissions:
34+
actions: read
35+
contents: read
36+
security-events: write
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
language: [ 'csharp' ]
42+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
43+
# Use only 'java' to analyze code written in Java, Kotlin or both
44+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
45+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
46+
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
with:
51+
submodules: recursive
52+
53+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@v2
56+
with:
57+
languages: ${{ matrix.language }}
58+
# If you wish to specify custom queries, you can do so here or in a config file.
59+
# By default, queries listed here will override any specified in a config file.
60+
# Prefix the list here with "+" to use these queries and those in the config file.
61+
62+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63+
# queries: security-extended,security-and-quality
64+
65+
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
67+
# If this step fails, then you should remove it and run the build manually (see below)
68+
- name: Autobuild
69+
uses: github/codeql-action/autobuild@v2
70+
with:
71+
working-directory: ${{ github.workspace }}/src/Typewriter
72+
73+
# ℹ️ Command-line programs to run using the OS shell.
74+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
75+
76+
# If the Autobuild fails above, remove it and uncomment the following three lines.
77+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
78+
79+
# - run: |
80+
# echo "Run, Build Application using script"
81+
# ./location_of_script_within_repo/buildscript.sh
82+
83+
- name: Perform CodeQL Analysis
84+
uses: github/codeql-action/analyze@v2
85+
with:
86+
category: "/language:${{matrix.language}}"

GraphODataTemplateWriter.Test/GraphODataTemplateWriter.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</Content>
1717
</ItemGroup>
1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
2020
<PackageReference Include="MSTest.TestAdapter">
2121
<Version>3.1.1</Version>
2222
</PackageReference>

scripts/copy-cli-models-kiota.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ Write-Host "Removed the existing generated files in the repo." -ForegroundColor
99
New-Item -ItemType directory -Path $env:RepoModelsDir
1010
Move-Item $env:OutputFullPath $env:RepoModelsDir
1111
Write-Host "Moved the models from $modelsDirectory into the local repo." -ForegroundColor Green
12+
13+
$helpUpdateScript = Join-Path -Path $env:WorkspaceRootDir -ChildPath .azure-pipelines/powershell/HelpUpdate.ps1
14+
. $helpUpdateScript
15+
16+
Update-UsersMeAlias -WorkspaceRootDir $env:WorkspaceRootDir
17+
Update-MeUserIdHelp -WorkspaceRootDir $env:WorkspaceRootDir
18+
19+
Write-Host "Updated 'me' help content in $env:RepoModelsDir" -ForegroundColor Green

0 commit comments

Comments
 (0)