From 44de83250badee5b27f1c6193069eff416407daf Mon Sep 17 00:00:00 2001 From: David Paulson Date: Thu, 25 Feb 2021 09:56:10 -0600 Subject: [PATCH 1/6] Added gitignore for Extra project EnabledTraces.config --- ExTRA/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 ExTRA/.gitignore diff --git a/ExTRA/.gitignore b/ExTRA/.gitignore new file mode 100644 index 0000000000..dd0c72e0f3 --- /dev/null +++ b/ExTRA/.gitignore @@ -0,0 +1 @@ +EnabledTraces.config \ No newline at end of file From 86f1ae5fe58c90feb32dc6df5edf76685179c948 Mon Sep 17 00:00:00 2001 From: David Paulson Date: Thu, 25 Feb 2021 14:37:55 -0600 Subject: [PATCH 2/6] Added Issue and PR templates --- .../check-setting-or-config-request.md | 17 ++++++++++++++++ .github/ISSUE_TEMPLATE/issue-report.md | 20 +++++++++++++++++++ .github/ISSUE_TEMPLATE/work-item.md | 14 +++++++++++++ .github/pull_request_template.md | 11 ++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/check-setting-or-config-request.md create mode 100644 .github/ISSUE_TEMPLATE/issue-report.md create mode 100644 .github/ISSUE_TEMPLATE/work-item.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/check-setting-or-config-request.md b/.github/ISSUE_TEMPLATE/check-setting-or-config-request.md new file mode 100644 index 0000000000..cd55125a71 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/check-setting-or-config-request.md @@ -0,0 +1,17 @@ +--- +name: New Feature or Tool +about: If you have a new feature or tool request +title: '' +labels: '' +assignees: '' + +--- + +**Is your request related to a problem? Please describe.** +A clear and concise description of what the problem is and the results it had on the environment. + +**Describe The Request** +A clear and concise description of the feature to add to a current tool or a new tool with what we all want to be checking with examples. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/issue-report.md b/.github/ISSUE_TEMPLATE/issue-report.md new file mode 100644 index 0000000000..a0227a5721 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-report.md @@ -0,0 +1,20 @@ +--- +name: Issue Report +about: Create a report to help us improve +title: "[Issue]" +labels: Issue +assignees: '' + +--- + +**Describe the issue** +A clear and concise description of what the issue is, including what script you are seeing the error in. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Script Output** +If applicable, add the exception that you are seeing that wasn't handled. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/work-item.md b/.github/ISSUE_TEMPLATE/work-item.md new file mode 100644 index 0000000000..ad7f9dd1b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/work-item.md @@ -0,0 +1,14 @@ +--- +name: Work Item +about: Work that needs to be done within the project +title: "[Work Item]" +labels: Work Item +assignees: '' + +--- + +**Describe the work** +Provide details of the work that needs to be done within the project + +**Additional Context** +Any other context here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..1c0b420bbd --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +**Issue:** +Describe what the issue is you are addressing + +**Reason:** +Describe what the reason is for making the change + +**Fix:** +Short description of the fix + +**Validation:** +Provide if applicable \ No newline at end of file From 3f68122b5d61c23bbc93477f27e6e900755dfa62 Mon Sep 17 00:00:00 2001 From: David Paulson Date: Thu, 25 Feb 2021 16:19:19 -0600 Subject: [PATCH 3/6] Add Release Notes of Script Versions --- .build/Build.ps1 | 12 +++++++++++- azure-pipelines.yml | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.build/Build.ps1 b/.build/Build.ps1 index ed33e227e6..4431ac090f 100644 --- a/.build/Build.ps1 +++ b/.build/Build.ps1 @@ -25,7 +25,11 @@ New-Item -Path $distFolder -ItemType Directory | Out-Null File names must be unique across the repo since we release in a flat structure. #> -$scriptFiles = Get-ChildItem -Path $repoRoot -Directory | Where-Object { $_.Name -ne ".build" } | ForEach-Object { Get-ChildItem -Path $_.FullName *.ps1 -Recurse } | ForEach-Object { $_.FullName } +$scriptFiles = Get-ChildItem -Path $repoRoot -Directory | + Where-Object { $_.Name -ne ".build" } | + ForEach-Object { Get-ChildItem -Path $_.FullName *.ps1 -Recurse } | + Sort-Object Name | + ForEach-Object { $_.FullName } $nonUnique = @($scriptFiles | ForEach-Object { [IO.Path]::GetFileName($_) } | Group-Object | Where-Object { $_.Count -gt 1 }) if ($nonUnique.Count -gt 0) { @@ -54,6 +58,10 @@ $scriptFiles = $scriptFiles | Where-Object { $disclaimer = [IO.File]::ReadAllLines("$repoRoot\.build\disclaimer.txt") +$versionFile = "$distFolder\ScriptVersions.txt" +New-Item -Path $versionFile -ItemType File | Out-Null +"# Script Versions" | Out-File $versionFile -Append + $scriptFiles | ForEach-Object { $scriptContent = New-Object 'System.Collections.Generic.List[string]' $scriptContent.AddRange([IO.File]::ReadAllLines($_)) @@ -115,5 +123,7 @@ $scriptFiles | ForEach-Object { $scriptContent.Insert(0, "") $scriptContent.InsertRange(0, $disclaimer) + "$([IO.Path]::GetFileName($_)): v$($commitTime.ToString("yy.MM.dd.HHmm"))" | Out-File $versionFile -Append + Set-Content -Path ([IO.Path]::Combine($distFolder, [IO.Path]::GetFileName($_))) -Value $scriptContent } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d2994d239..759a53bf09 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,6 +21,10 @@ steps: .\Build.ps1 displayName: "Build Script" +- pwsh: | + Get-Content dist\ScriptVersions.txt + displayName: "Display Script Versions file" + - pwsh: | $tag = "v$((Get-Date).ToString(`"yy.MM.dd.HHmm`"))" Write-Host "##vso[task.setvariable variable=ReleaseTagValue]$tag" @@ -77,5 +81,7 @@ steps: tagPattern: 'v[0-9].[0-9].[0-9].[0-9]' tag: $(ReleaseTagValue) title: $(ReleaseTagValue) + releaseNotesSource: 'file' + releaseNotesFile: dist\ScriptVersions.txt assets: dist\*.ps1 addChangeLog: true \ No newline at end of file From 4027705d9b7ada422a30ff6bdaaef96a9f3ceb4b Mon Sep 17 00:00:00 2001 From: Bill Long Date: Thu, 25 Feb 2021 18:42:38 -0600 Subject: [PATCH 4/6] Put script versions in a table --- .build/Build.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/Build.ps1 b/.build/Build.ps1 index 4431ac090f..650725cf36 100644 --- a/.build/Build.ps1 +++ b/.build/Build.ps1 @@ -61,6 +61,7 @@ $disclaimer = [IO.File]::ReadAllLines("$repoRoot\.build\disclaimer.txt") $versionFile = "$distFolder\ScriptVersions.txt" New-Item -Path $versionFile -ItemType File | Out-Null "# Script Versions" | Out-File $versionFile -Append +"Script | Version" | Out-File $versionFile -Append $scriptFiles | ForEach-Object { $scriptContent = New-Object 'System.Collections.Generic.List[string]' @@ -123,7 +124,7 @@ $scriptFiles | ForEach-Object { $scriptContent.Insert(0, "") $scriptContent.InsertRange(0, $disclaimer) - "$([IO.Path]::GetFileName($_)): v$($commitTime.ToString("yy.MM.dd.HHmm"))" | Out-File $versionFile -Append + "$([IO.Path]::GetFileName($_)) | v$($commitTime.ToString("yy.MM.dd.HHmm"))" | Out-File $versionFile -Append Set-Content -Path ([IO.Path]::Combine($distFolder, [IO.Path]::GetFileName($_))) -Value $scriptContent } From 49005adf812076b906ad2c865188d71d257139ed Mon Sep 17 00:00:00 2001 From: David Paulson Date: Thu, 25 Feb 2021 18:57:35 -0600 Subject: [PATCH 5/6] Fixed table formatting --- .build/Build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.build/Build.ps1 b/.build/Build.ps1 index 650725cf36..85cd281a93 100644 --- a/.build/Build.ps1 +++ b/.build/Build.ps1 @@ -62,6 +62,7 @@ $versionFile = "$distFolder\ScriptVersions.txt" New-Item -Path $versionFile -ItemType File | Out-Null "# Script Versions" | Out-File $versionFile -Append "Script | Version" | Out-File $versionFile -Append +"-------|--------" | Out-File $versionFile -Append $scriptFiles | ForEach-Object { $scriptContent = New-Object 'System.Collections.Generic.List[string]' From f7f41cacdc55bc105dd75c772c326c7e13c341b7 Mon Sep 17 00:00:00 2001 From: Bill Long Date: Mon, 1 Mar 2021 14:56:48 -0800 Subject: [PATCH 6/6] Don't use TryAdd since older dotnet doesn't have it --- PublicFolders/ValidateMailEnabledPublicFolders.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PublicFolders/ValidateMailEnabledPublicFolders.ps1 b/PublicFolders/ValidateMailEnabledPublicFolders.ps1 index 59fb3ae283..13c6cb482c 100644 --- a/PublicFolders/ValidateMailEnabledPublicFolders.ps1 +++ b/PublicFolders/ValidateMailEnabledPublicFolders.ps1 @@ -85,7 +85,10 @@ for ($i = 0; $i -lt $ipmSubtreeMailEnabled.Count; $i++) { if ($null -eq $result) { $mailEnabledFoldersWithNoADObject += $ipmSubtreeMailEnabled[$i] } else { - $mailPublicFoldersLinked.TryAdd($result.Guid.ToString(), $result) | Out-Null + $guidString = $result.Guid.ToString() + if (-not $mailPublicFoldersLinked.ContainsKey($guidString)) { + $mailPublicFoldersLinked.Add($guidString, $result) | Out-Null + } } }