Skip to content

Commit 8129486

Browse files
authored
Merge pull request #2882 from microsoftgraph/update-main-01-08-2024
Merge to main
2 parents 1eaea0e + c9c6c2e commit 8129486

File tree

8,844 files changed

+1213847
-279453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,844 files changed

+1213847
-279453
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
git submodule update --init --recursive
4343
- template: ./common-templates/install-tools.yml
4444
- template: ./common-templates/security-pre-checks.yml
45-
45+
4646
- template: ./generation-templates/authentication-module.yml
4747
parameters:
4848
Test: ${{ parameters.Test }}

.azure-pipelines/common-templates/download-openapi-docs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,24 @@ steps:
9292
script: |
9393
. "$(System.DefaultWorkingDirectory)\tools\Versions\BumpModuleVersion.ps1" -BumpV1Module -BumpBetaModule -BumpAuthModule -Debug
9494
95+
- task: PowerShell@2
96+
name: BuildOpenApiMetadataDetectionTool
97+
displayName: Build tool for detecting metadata changes
98+
inputs:
99+
pwsh: true
100+
targetType: inline
101+
script: dotnet build --configuration Release
102+
workingDirectory: "$(System.DefaultWorkingDirectory)/tools/OpenApiInfoGenerator/OpenApiInfoGenerator"
103+
104+
- task: PowerShell@2
105+
name: GenerateOpenApiErrorAndInfoFiles
106+
displayName: Generate OpenApi error and info file for detecting unnecessary changes that would lead to a breaking change
107+
inputs:
108+
pwsh: true
109+
targetType: inline
110+
script: dotnet run
111+
workingDirectory: "$(System.DefaultWorkingDirectory)/tools/OpenApiInfoGenerator/OpenApiInfoGenerator"
112+
95113
- task: Bash@3
96114
displayName: Commit downloaded files
97115
condition: and(succeeded(), ne(variables['OpenAPIDocDiff.ModulesWithChanges'], ''))

.azure-pipelines/common-templates/install-tools.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ steps:
1212
inputs:
1313
debugMode: false
1414
version: 7.x
15+
16+
- task: UseDotNet@2
17+
displayName: Use .NET SDK
18+
inputs:
19+
debugMode: false
20+
version: 8.x
1521

1622
- task: NuGetToolInstaller@1
1723
displayName: Install Nuget

.azure-pipelines/config/credscan/credscan-suppressions.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,23 @@
3838
"file": [
3939
"src\\Users.Actions\\beta\\examples\\Test-MgBetaUserPassword.md",
4040
"src\\Users.Actions\\beta\\examples\\Update-MgBetaUserPassword.md",
41+
"src\\Users.Actions\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md",
4142
"src\\Users.Actions\\v1.0\\examples\\Update-MgUserPassword.md"
4243
],
4344
"_justification": "[Users.Actions] Examples contain random values recognized as secret"
4445
},
4546
{
4647
"file": [
47-
"src\\DeviceManagement.Actions\\beta\\examples\\Update-MgBetaDeviceManagementVirtualEndpointOnPremisConnectionAdDomainPassword.md"
48+
"src\\DeviceManagement.Actions\\beta\\examples\\Update-MgBetaDeviceManagementVirtualEndpointOnPremiseConnectionAdDomainPassword.md"
4849
],
4950
"_justification": "[DeviceManagement.Actions] Examples contain random values recognized as secret"
5051
},
52+
{
53+
"file": [
54+
"src\\Users.Actions\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md"
55+
],
56+
"_justification": "[Users.Actions] Examples contain random values recognized as secret"
57+
},
5158
{
5259
"file": [
5360
"tools\\Tests\\loadEnv.md"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
steps:
4+
- task: PowerShell@2
5+
displayName: Check for OpenAPI Errors
6+
inputs:
7+
targetType: inline
8+
pwsh: true
9+
script: |
10+
. $(System.DefaultWorkingDirectory)/tools/OpenApiInfoGenerator/OpenApiInfoGenerator/OpenApiChanges.ps1

.github/ISSUE_TEMPLATE/03-blank-issue.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
33
- name: For issues related to authentication and service errors
44
url: https://learn.microsoft.com/powershell/microsoftgraph/troubleshooting

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "daily"
12+
open-pull-requests-limit: 1
13+
- package-ecosystem: "nuget"
14+
directory: "/src/Authentication/Authentication.Test"
15+
schedule:
16+
interval: "daily"
17+
allow:
18+
- dependency-name: "Moq"
1219
open-pull-requests-limit: 1

.github/policies/resourceManagement.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
id:
1+
id:
22
name: GitOps.PullRequestIssueManagement
33
description: GitOps.PullRequestIssueManagement primitive
4-
owner:
4+
owner:
55
resource: repository
66
disabled: false
7-
where:
7+
where:
88
configuration:
99
resourceManagementConfiguration:
1010
scheduledSearches:
11-
- description:
11+
- description:
1212
frequencies:
1313
- hourly:
1414
hour: 1
1515
filters:
1616
- isIssue
1717
- isOpen
1818
- hasLabel:
19-
label: 'Needs: Author Feedback'
19+
label: 'status:waiting-for-author-feedback'
2020
- hasLabel:
2121
label: no-recent-activity
2222
- noActivitySince:
@@ -25,15 +25,15 @@ configuration:
2525
label: service bug
2626
actions:
2727
- closeIssue
28-
- description:
28+
- description:
2929
frequencies:
3030
- hourly:
3131
hour: 1
3232
filters:
3333
- isIssue
3434
- isOpen
3535
- hasLabel:
36-
label: 'Needs: Author Feedback'
36+
label: 'status:waiting-for-author-feedback'
3737
- noActivitySince:
3838
days: 4
3939
- isNotLabeledWith:
@@ -43,7 +43,7 @@ configuration:
4343
label: no-recent-activity
4444
- addReply:
4545
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
46-
- description:
46+
- description:
4747
frequencies:
4848
- hourly:
4949
hour: 1
@@ -59,20 +59,30 @@ configuration:
5959
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
6060
- closeIssue
6161
eventResponderTasks:
62+
- if:
63+
- payloadType: Issues
64+
- isAction:
65+
action: Closed
66+
- hasLabel:
67+
label: 'status:waiting-for-author-feedback'
68+
then:
69+
- removeLabel:
70+
label: 'status:waiting-for-author-feedback'
71+
description:
6272
- if:
6373
- payloadType: Issue_Comment
6474
- isAction:
6575
action: Created
6676
- isActivitySender:
6777
issueAuthor: True
6878
- hasLabel:
69-
label: 'Needs: Author Feedback'
79+
label: 'status:waiting-for-author-feedback'
7080
then:
7181
- addLabel:
7282
label: 'Needs: Attention :wave:'
7383
- removeLabel:
74-
label: 'Needs: Author Feedback'
75-
description:
84+
label: 'status:waiting-for-author-feedback'
85+
description:
7686
- if:
7787
- payloadType: Issues
7888
- not:
@@ -83,13 +93,13 @@ configuration:
8393
then:
8494
- removeLabel:
8595
label: no-recent-activity
86-
description:
96+
description:
8797
- if:
8898
- payloadType: Issues
8999
- labelAdded:
90100
label: service bug
91101
then: []
92-
description:
102+
description:
93103
- if:
94104
- payloadType: Issue_Comment
95105
- activitySenderHasAssociation:
@@ -102,7 +112,7 @@ configuration:
102112
isRegex: False
103113
then:
104114
- addLabel:
105-
label: 'Needs: Author Feedback'
106-
description:
107-
onFailure:
108-
onSuccess:
115+
label: 'status:waiting-for-author-feedback'
116+
description:
117+
onFailure:
118+
onSuccess:

.github/workflows/docker.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Docker image
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags: ["*"]
6+
env:
7+
REGISTRY: msgraphprod.azurecr.io
8+
IMAGE_NAME: public/microsoftgraph/powershell
9+
jobs:
10+
push_to_registry:
11+
environment:
12+
name: acr
13+
name: Push Docker image
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out the repo
17+
uses: actions/checkout@v4
18+
- name: Login to GitHub package feed
19+
uses: docker/login-action@v3.3.0
20+
with:
21+
username: ${{ secrets.ACR_USERNAME }}
22+
password: ${{ secrets.ACR_PASSWORD }}
23+
registry: ${{ env.REGISTRY }}
24+
25+
- name: Get truncated run number
26+
id: getversion
27+
run: |
28+
$version = $Env:GITHUB_REF.replace("refs/tags/", "")
29+
Write-Output "version=$version" >> $Env:GITHUB_OUTPUT
30+
shell: pwsh
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
- name: Push to GitHub Packages - Release
36+
uses: docker/build-push-action@v6.5.0
37+
with:
38+
push: true
39+
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
41+
build-args: |
42+
VERSION=${{ steps.getversion.outputs.version }}

.github/workflows/metadatachanges.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
# This is a basic workflow to help you get started with Actions
4+
5+
name: "Metadata Changes"
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
branches:
10+
- dev
11+
paths:
12+
- openApiDocs/**
13+
- src/Authentication/Authentication/custom/common/MgCommandMetadata.json
14+
- docs/OpenApiInfo/**
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
CheckForMetadataChanges:
19+
# The type of runner that the job will run on
20+
runs-on: ubuntu-latest
21+
permissions:
22+
pull-requests: write
23+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action != 'closed')
24+
# Steps represent a sequence of tasks that will be executed as part of the job
25+
steps:
26+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
ref: ${{ github.event.pull_request.head.sha }}
31+
32+
33+
# Check if error report exists
34+
- name: Check file existence
35+
id: check_files
36+
uses: andstor/file-existence-action@v3
37+
with:
38+
files: "docs/OpenApiInfo/v1.0/openAPIErrors.csv"
39+
40+
# If it exists then add a warning to comment section of the PR
41+
- name: File exists
42+
if: steps.check_files.outputs.files_exists == 'true'
43+
uses: actions/github-script@v7
44+
with:
45+
script: |
46+
const name = 'OpenApiChecks';
47+
const body = '**Changes in metadata detected :bangbang:** :warning:\n Please have a look at the metadata changes report in `docs/OpenApiInfo/v1.0/openAPIErrors.csv`\nThis action is important before merging :pleading_face:';
48+
49+
await github.rest.issues.createComment({
50+
issue_number: context.issue.number,
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
body: body
54+
})
55+
56+
await github.rest.pulls.createReview({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
body: body,
60+
pull_number: context.issue.number,
61+
event: 'REQUEST_CHANGES'
62+
})
63+
64+
core.setFailed(body)
65+
66+
# [0] https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
67+
# [1] https://hub.github.com/hub-pull-request.1.html
68+
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token

0 commit comments

Comments
 (0)