Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from d365collaborative:master #123

Merged
merged 20 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: d365fo.tools-PR-Test
on:
push:
branches:
- development
- master
pull_request:
workflow_dispatch:

Expand All @@ -15,9 +15,9 @@ jobs:
name: Prerequisites
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }}
Expand All @@ -30,10 +30,10 @@ jobs:
runs-on: windows-latest
needs: prerequisites
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }}
Expand All @@ -46,7 +46,7 @@ jobs:
run: build\vsts-validate.ps1 -TestGeneral $true -TestFunctions $false -Exclude "PSScriptAnalyzer.Tests.ps1"
- name: Publish Test Results **/TEST-*.xml
if: always()
uses: EnricoMi/publish-unit-test-result-action/composite@v2
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
files: '**/TEST-*.xml'
check_name: 'General Unit Tests Results'
Expand All @@ -57,10 +57,10 @@ jobs:
runs-on: windows-latest
needs: prerequisites
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }}
Expand All @@ -73,7 +73,7 @@ jobs:
run: build\vsts-validate-psscriptanalyzer.ps1 -TestPublic $true -TestInternal $false
- name: Publish Test Results **/TEST-*.xml
if: always()
uses: EnricoMi/publish-unit-test-result-action/composite@v2
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
files: '**/TEST-*.xml'
check_name: 'Public Functions Unit Tests Results'
Expand All @@ -84,10 +84,10 @@ jobs:
runs-on: windows-latest
needs: Prerequisites
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }}
Expand All @@ -100,7 +100,7 @@ jobs:
run: build\vsts-validate-psscriptanalyzer.ps1 -TestPublic $false -TestInternal $true
- name: Publish Test Results **/TEST-*.xml
if: always()
uses: EnricoMi/publish-unit-test-result-action/composite@v2
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
files: '**/TEST-*.xml'
check_name: 'Internal Functions Unit Tests Results'
Expand All @@ -111,10 +111,10 @@ jobs:
runs-on: windows-latest
needs: prerequisites
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }}
Expand All @@ -127,7 +127,7 @@ jobs:
run: build\vsts-validate.ps1 -TestGeneral $false -TestFunctions $true
- name: Publish Test Results **/TEST-*.xml
if: always()
uses: EnricoMi/publish-unit-test-result-action/composite@v2
uses: EnricoMi/publish-unit-test-result-action/windows@v2
with:
files: '**/TEST-*.xml'
check_name: 'Individual Unit Tests Results'
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
uses: PowershellFrameworkCollective/psframework@32c18f13173be8cc6b6803c63c40b9d7ab5aec12 # version 1.0.12
- name: Azure.Storage
uses: Azure/[email protected] # unclear which commit/tag corresponds to https://www.powershellgallery.com/packages/Azure.Storage/4.4.0
# AzureAd does not seem to have a public GitHub repository
# - name: AzureAd
# uses:
- name: PSNotification
uses: Splaxi/PSNotification@b344c3dfdb04db1a338f203d1a0c5ae72d67ae89 # version 0.5.3
- name: PSOAuthHelper
uses: Splaxi/PSOAuthHelper@837a2da63bf76e86f339a4e43e38df5a3b82affe # version 0.3.0
- name: ImportExcel
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/update-generated-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
name: Generate text
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1, **/buildtools.ps1') }}
key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1', '**/buildtools.ps1') }}
- name: Prerequisites
if: steps.cache-powershell-modules.outputs.cache-hit != 'true'
shell: powershell
Expand All @@ -40,11 +40,12 @@ jobs:
shell: powershell
run: build\generate-findcommandindex.ps1
- name: Create a pull request for changes
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v7
with:
commit-message: |
🤖 Fix best practice deviations

This pull request was automatically created by the d365fo.tools-Generate-Text action'
title: '🤖 Fix best practice deviations'
body: 'This pull request was automatically created by the d365fo.tools-Generate-Text action. See [Building tools](https://github.com/d365collaborative/d365fo.tools/wiki/Building-tools) for more information.'
body: 'This pull request was automatically created by the d365fo.tools-Generate-Text action. See [Building tools](https://github.com/d365collaborative/d365fo.tools/wiki/Building-tools) for more information.'
branch: 'update-generated-text/pull-request-patch-for-branch-${{ github.ref_name }}'
4 changes: 2 additions & 2 deletions .github/workflows/update-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'wiki/**'
- 'docs/**'
branches:
- development
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Publish wiki folder to repository wiki
uses: FH-Inway/github-wiki-publish-action@rsync
Expand Down
3 changes: 2 additions & 1 deletion build/buildtools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ foreach ($item in $modules) {
Write-Host "Installing $item" -ForegroundColor Cyan
Install-Module -Name $item -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck
}

Import-Module $item -Force
Get-Module -Name $item
}
6 changes: 4 additions & 2 deletions build/vsts-prerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Write-Host "The user running is: $($env:UserName)"

# $modules = @("PSFramework", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "PowerShellGet", "PackageManagement","ImportExcel","PSScriptAnalyzer")
$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel")
$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "PSOAuthHelper", "ImportExcel")

Write-Host "Installing Pester, maximum version 4.99.99" -ForegroundColor Cyan
Install-Module "Pester" -MaximumVersion 4.99.99 -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck

foreach ($item in $modules) {
Expand All @@ -14,6 +15,7 @@ foreach ($item in $modules) {
Write-Host "Installing $item" -ForegroundColor Cyan
Install-Module -Name $item -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck
}

Import-Module $item -Force
Get-Module -Name $item
}
2 changes: 1 addition & 1 deletion build/vsts-validate-psscriptanalyzer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Write-Host "Working on the machine named: $($env:computername)"
Write-Host "The user running is: $($env:UserName)"

$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel")
$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "PSOAuthHelper", "ImportExcel")

foreach ($item in $modules) {
$module = Get-Module -Name $item -ErrorAction SilentlyContinue
Expand Down
2 changes: 1 addition & 1 deletion build/vsts-validate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Write-Host "Working on the machine named: $($env:computername)"
Write-Host "The user running is: $($env:UserName)"

$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel")
$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "PSOAuthHelper", "ImportExcel")

foreach ($item in $modules) {
$module = Get-Module -Name $item -ErrorAction SilentlyContinue
Expand Down
4 changes: 2 additions & 2 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ If you wanna help out to make the module even more robust
Documentation is really the area we welcome any help possible. The documentation refers to CBH (Comment Based Help). The CBH documentation is included with each command and is the content you see when you run `Get-Help Function-Name`. If any of that content is not clear enough or if the examples in the functions are not working, you should say so (e.g. raise an issue on GitHub or contact us on twitter). Even if you are a casual user or a PowerShell newbie, we need your angle to make it as straight forward and clear as possible.

## Contribute New Commands
Start out reviewing the [list of functions on in the docs folder](https://github.com/d365collaborative/d365fo.tools/tree/development/docs), or pulling the list from the module with `Get-Command -Module d365fo.tools -CommandType Function | Out-GridView`. If you find something similar already exists, open [a new issue on GitHub](https://github.com/d365collaborative/d365fo.tools/issues/new) to request an enhancement to that command. If nothing similar pops up, either ping @splaxi on twitter with your idea about the new command or open a new issue on GitHub with details or requirements you need.
Start out reviewing the [list of functions on in the docs folder](https://github.com/d365collaborative/d365fo.tools/tree/master/docs), or pulling the list from the module with `Get-Command -Module d365fo.tools -CommandType Function | Out-GridView`. If you find something similar already exists, open [a new issue on GitHub](https://github.com/d365collaborative/d365fo.tools/issues/new) to request an enhancement to that command. If nothing similar pops up, either ping @splaxi on twitter with your idea about the new command or open a new issue on GitHub with details or requirements you need.

## Report Bugs
[Open a new issue](https://github.com/d365collaborative/d365fo.tools/issues/new) on GitHub and fill in all the details. The title should report the affected function, followed by a brief description (e.g. _Get-D365Environment - Add property x to default view_). The provided template holds most of the details coders need to fix the issue.

## Fix Bugs
If you feel for fixing a bug, but don't know GitHub enough, the dbatools.io project has a good starting guide. We are on the same team, so instead of us writing a guide that is close to theirs - we simply point to theirs [step-by-step guide](https://dbatools.io/firstpull).

[Open a PR](https://github.com/d365collaborative/d365fo.tools/pulls) targeting ideally just one ps1 file (the PR needs to target the *development* branch), with the name of the function being fixed as a title. Everyone will chime in reviewing the code and either approve the PR or request changes. The more targeted and focused the PR, the easier to merge, the fastest to go into the next release. Keep them as simple as possible to speed up the process.
[Open a PR](https://github.com/d365collaborative/d365fo.tools/pulls) targeting ideally just one ps1 file (the PR needs to target the *master* branch), with the name of the function being fixed as a title. Everyone will chime in reviewing the code and either approve the PR or request changes. The more targeted and focused the PR, the easier to merge, the fastest to go into the next release. Keep them as simple as possible to speed up the process.

## Branching
Make sure to read our [branching guide](https://github.com/d365collaborative/d365fo.tools/wiki/Branching) on the wiki to get a good starting point.
Expand Down
Loading
Loading