Skip to content

Commit 7839708

Browse files
authored
Merge pull request #1953 from microsoftgraph/1791-help-for-get-mgusermanagerbyref-contains-examples-for-get-mgusermanager-and-get-mguser
Prevent importing of examples not related to a commandlet
2 parents c1eddd6 + ea45aa7 commit 7839708

File tree

3 files changed

+228
-83
lines changed

3 files changed

+228
-83
lines changed

.azure-pipelines/weekly-examples-update.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
trigger: none # disable triggers based on commits.
44
pr: none # disable as a PR gate.
5-
name: 'PowerShellExamplesUpdate Check'
5+
name: 'PowerShellExamplesUpdateV1 Check'
66
schedules:
77
- cron: "0 3 * * FRI" # every Friday at 3AM UTC (off hours for Redmond, Nairobi and Montréal)
8-
displayName: 'PowerShellExamplesUpdate Check'
8+
displayName: 'PowerShellExamplesUpdateV1'
99
branches:
1010
include:
1111
- dev
@@ -28,12 +28,11 @@ resources:
2828
ref: dev
2929

3030
jobs:
31-
- job: PowerShellExamplesUpdate
31+
- job: PowerShellExamplesUpdateV1
3232
pool:
3333
name: ${{ parameters.BuildAgent }}
3434
timeoutInMinutes: ${{ parameters.PipelineTimeout }}
3535
steps:
36-
- template: ./common-templates/update-sdkversion.yml
3736

3837
- task: PowerShell@2
3938
name: "ComputeBranch"
@@ -56,13 +55,21 @@ jobs:
5655
git status
5756
5857
- task: PowerShell@2
59-
displayName: 'Update Examples From Graph Reference'
58+
displayName: 'Update Examples From API reference - V1'
6059
continueOnError: false
6160
inputs:
6261
targetType: 'filePath'
6362
pwsh: true
6463
filePath: tools\ExamplesGenerator.ps1
6564

65+
- task: PublishBuildArtifacts@1
66+
displayName: 'Publish Examples to be reviewed as artifact'
67+
inputs:
68+
PathtoPublish: 'examplesreport'
69+
ArtifactName: 'ExamplesToBeReviewed'
70+
publishLocation: 'Container'
71+
# StoreAsTar: true
72+
6673
- task: PowerShell@2
6774
displayName: Pushing to github
6875
env:
@@ -71,15 +78,17 @@ jobs:
7178
targetType: inline
7279
pwsh: true
7380
script: |
81+
git config --global user.email "[email protected]"
82+
git config --global user.name "Microsoft Graph DevX Tooling"
7483
git status
7584
git add .
76-
git commit -m "Updating examples"
77-
git push --set-upstream origin $(ComputeBranch.WeeklyExamplesBranch)
85+
git commit -m "Updating v1 examples"
86+
git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
7887
git status
7988
8089
- template: ./common-templates/create-pr.yml
8190
parameters:
8291
BaseBranch: "dev"
8392
TargetBranch: $(ComputeBranch.WeeklyExamplesBranch)
8493
Title: "[v1] Examples Update"
85-
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
94+
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,7 @@ MigrationBackup/
358358
.vscode/
359359

360360
#Custom Environment Files
361-
localenv.json
361+
localenv.json
362+
363+
#Wrong Examples report Folder
364+
examplesreport/

0 commit comments

Comments
 (0)