From be4b43795987de8cf0072ea8e4cbbc8c296872e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Mon, 30 Oct 2023 20:32:29 +0100 Subject: [PATCH 1/7] Create ScriptAnalyser.yml --- .github/workflows/ScriptAnalyser.yml | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ScriptAnalyser.yml diff --git a/.github/workflows/ScriptAnalyser.yml b/.github/workflows/ScriptAnalyser.yml new file mode 100644 index 0000000..7b3d6a3 --- /dev/null +++ b/.github/workflows/ScriptAnalyser.yml @@ -0,0 +1,49 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# https://github.com/microsoft/action-psscriptanalyzer +# For more information on PSScriptAnalyzer in general, see +# https://github.com/PowerShell/PSScriptAnalyzer + +name: PSScriptAnalyzer + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '16 12 * * 2' + +permissions: + contents: read + +jobs: + build: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Run PSScriptAnalyzer + uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f + with: + # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. + # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. + path: .\ + recurse: true + # Include your own basic security rules. Removing this option will run all the rules + includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"' + output: results.sarif + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif From cf19b6f15b2a5f4bd69cc8188f5926c373239342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Mon, 30 Oct 2023 20:32:51 +0100 Subject: [PATCH 2/7] Add files via upload --- .github/workflows/PublishNugetPackage.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/workflows/PublishNugetPackage.yml diff --git a/.github/workflows/PublishNugetPackage.yml b/.github/workflows/PublishNugetPackage.yml new file mode 100644 index 0000000..9beac76 --- /dev/null +++ b/.github/workflows/PublishNugetPackage.yml @@ -0,0 +1,5 @@ + - name: Publish Module to PowerShell Gallery + uses: pcgeek86/publish-powershell-module-action@v20 + id: publish-module + with: + NuGetApiKey: ${{ secrets.PS_GALLERY_KEY }} \ No newline at end of file From d8e5c8277be065acfa69631180460095df4118e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Mon, 30 Oct 2023 20:35:26 +0100 Subject: [PATCH 3/7] Update PublishNugetPackage.yml --- .github/workflows/PublishNugetPackage.yml | 33 +++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/PublishNugetPackage.yml b/.github/workflows/PublishNugetPackage.yml index 9beac76..523e38b 100644 --- a/.github/workflows/PublishNugetPackage.yml +++ b/.github/workflows/PublishNugetPackage.yml @@ -1,5 +1,28 @@ - - name: Publish Module to PowerShell Gallery - uses: pcgeek86/publish-powershell-module-action@v20 - id: publish-module - with: - NuGetApiKey: ${{ secrets.PS_GALLERY_KEY }} \ No newline at end of file +name: PublishNuget + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '16 12 * * 2' + +permissions: + contents: read + +jobs: + build: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Publish Module to PowerShell Gallery + uses: pcgeek86/publish-powershell-module-action@v20 + id: publish-module + with: + NuGetApiKey: ${{ secrets.PS_GALLERY_KEY }} From 03ad0ffbc1ea967d3cf20b655d24333a03d0d21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Tue, 31 Oct 2023 08:51:23 +0100 Subject: [PATCH 4/7] Update PublishNugetPackage.yml --- .github/workflows/PublishNugetPackage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/PublishNugetPackage.yml b/.github/workflows/PublishNugetPackage.yml index 523e38b..3fc78bf 100644 --- a/.github/workflows/PublishNugetPackage.yml +++ b/.github/workflows/PublishNugetPackage.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Publish Module to PowerShell Gallery - uses: pcgeek86/publish-powershell-module-action@v20 - id: publish-module - with: - NuGetApiKey: ${{ secrets.PS_GALLERY_KEY }} + uses: pcgeek86/publish-powershell-module-action@v20 + id: publish-module + with: + NuGetApiKey: ${{ secrets.PS_GALLERY_KEY }} From d8d72908f2c19fbbaf2832ea5798885f5775d3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Tue, 31 Oct 2023 08:53:00 +0100 Subject: [PATCH 5/7] Update PublishNugetPackage.yml --- .github/workflows/PublishNugetPackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PublishNugetPackage.yml b/.github/workflows/PublishNugetPackage.yml index 3fc78bf..04e29e4 100644 --- a/.github/workflows/PublishNugetPackage.yml +++ b/.github/workflows/PublishNugetPackage.yml @@ -17,7 +17,7 @@ jobs: contents: read # for actions/checkout to fetch code security-events: write # for github/codeql-action/upload-sarif to upload SARIF results actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - name: PSScriptAnalyzer + name: PublishNugetModule runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 030aeb148be668ea206003282d129280be089c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Tue, 31 Oct 2023 12:04:54 +0100 Subject: [PATCH 6/7] 1.0.0.137 --- PowerDataOps.psd1 | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/PowerDataOps.psd1 b/PowerDataOps.psd1 index 0aafa7f..4b776dc 100644 --- a/PowerDataOps.psd1 +++ b/PowerDataOps.psd1 @@ -1,9 +1,9 @@ # -# Module manifest for module 'PowerDataOps' +# Module manifest for module 'PSGet_PowerDataOps' # # Generated by: Aymeric Mouillé # -# Generated on: 28/07/2023 +# Generated on: 31/10/2023 # @{ @@ -12,7 +12,7 @@ RootModule = 'PowerDataOps' # Version number of this module. -ModuleVersion = '1.0.0.136' +ModuleVersion = '1.0.0.137' # Supported PSEditions # CompatiblePSEditions = @() @@ -69,7 +69,7 @@ Description = 'PowerShell module for Microsoft Dataverse (ex Common Data Service # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = '*' +FunctionsToExport = @() # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() @@ -109,17 +109,11 @@ PrivateData = @{ # ReleaseNotes of this module # ReleaseNotes = '' - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - # External dependent modules of this module - # ExternalModuleDependencies = @() + # ExternalModuleDependencies = '' } # End of PSData hashtable - + } # End of PrivateData hashtable # HelpInfo URI of this module From 8f7d8f47a948857971af815ddb23021e50a86dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aymeric=20Mouill=C3=A9?= Date: Tue, 31 Oct 2023 12:08:35 +0100 Subject: [PATCH 7/7] 1.0.0.138 - Watch-XrmOperation : Few refactoring --- PowerDataOps.psd1 | 14 ++++++++++---- src/Administration/Watch-XrmOperation.ps1 | 5 +---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/PowerDataOps.psd1 b/PowerDataOps.psd1 index 4b776dc..1902b82 100644 --- a/PowerDataOps.psd1 +++ b/PowerDataOps.psd1 @@ -1,5 +1,5 @@ # -# Module manifest for module 'PSGet_PowerDataOps' +# Module manifest for module 'PowerDataOps' # # Generated by: Aymeric Mouillé # @@ -12,7 +12,7 @@ RootModule = 'PowerDataOps' # Version number of this module. -ModuleVersion = '1.0.0.137' +ModuleVersion = '1.0.0.138' # Supported PSEditions # CompatiblePSEditions = @() @@ -109,11 +109,17 @@ PrivateData = @{ # ReleaseNotes of this module # ReleaseNotes = '' + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + # External dependent modules of this module - # ExternalModuleDependencies = '' + # ExternalModuleDependencies = @() } # End of PSData hashtable - + } # End of PrivateData hashtable # HelpInfo URI of this module diff --git a/src/Administration/Watch-XrmOperation.ps1 b/src/Administration/Watch-XrmOperation.ps1 index cca2687..0c8e47f 100644 --- a/src/Administration/Watch-XrmOperation.ps1 +++ b/src/Administration/Watch-XrmOperation.ps1 @@ -33,10 +33,7 @@ function Watch-XrmOperation { while ($monitor) { Start-Sleep -Seconds $PollingIntervalSeconds; - $operationData = Get-AdminPowerAppOperationStatus -OperationStatusUrl $OperationUrl; - if(-not $operationData) { - continue; - } + $operationData = Get-AdminPowerAppOperationStatus -OperationStatusUrl $OperationUrl; if(-not $operationData.Internal.Content) { continue; }