Skip to content

Commit b0a2250

Browse files
committed
✨ feat(docs): add GitHub discussion IDs to documentation files
- Introduce new PowerShell script Get-DiscussionId.ps1 for managing GitHub discussions - Add discussionId field to documentation markdown files to link them with GitHub discussions - Create HugoHelpers.ps1 for handling markdown files and YAML conversion - Introduce LoggingHelper.ps1 for enhanced logging capabilities in PowerShell scripts
1 parent f60cb91 commit b0a2250

File tree

41 files changed

+1616
-162
lines changed

Some content is hidden

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

41 files changed

+1616
-162
lines changed

.powershell/docs/Get-DiscussionId.ps1

Lines changed: 851 additions & 0 deletions
Large diffs are not rendered by default.

.powershell/docs/_includes/HugoHelpers.ps1

Lines changed: 502 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Setup
2+
3+
$OutputEncoding = [System.Text.Encoding]::UTF8
4+
5+
$ErrorActionPreference = 'Stop'
6+
7+
# Helpers
8+
. ./.powershell/docs/_includes/LoggingHelper.ps1
9+
. ./.powershell/docs/_includes/HugoHelpers.ps1 # Depends on LoggingHelper.ps1
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Ensure PowerShell-YAML module is available
2+
if (-not (Get-Module -ListAvailable -Name PoShLog)) {
3+
Install-Module -Name PoShLog -Force -Scope CurrentUser
4+
Import-Module -Name PoShLog
5+
}
6+
else {
7+
Import-Module -Name PoShLog
8+
}
9+
10+
If (-not $levelSwitch) {
11+
$levelSwitch = New-LevelSwitch -MinimumLevel Information
12+
# Create new logger
13+
# This is where you customize, when and how to log
14+
New-Logger |
15+
Set-MinimumLevel -ControlledBy $levelSwitch | # You can change this value later to filter log messages
16+
# Here you can add as many sinks as you want - see https://github.com/PoShLog/PoShLog/wiki/Sinks for all available sinks
17+
#Add-SinkPowerShell | # Tell logger to write log messages to console
18+
Add-SinkConsole | # Tell logger to write log messages to console
19+
#Add-SinkFile -Path './logs/.log' | # Tell logger to write log messages into file
20+
Start-Logger
21+
Write-Debug "New Logger Started"
22+
}
23+
24+
function Set-DebugMode {
25+
param(
26+
[bool]$EnableDebug = $true
27+
)
28+
if ($EnableDebug) {
29+
$levelSwitch.MinimumLevel = 'Debug'
30+
Write-InfoLog "Debug mode enabled."
31+
}
32+
else {
33+
$levelSwitch.MinimumLevel = 'Information'
34+
Write-InfoLog "Debug mode disabled."
35+
}
36+
}
37+
38+
function Get-IsDebug {
39+
<#
40+
.SYNOPSIS
41+
Returns $true if debug or verbose mode is enabled, otherwise $false.
42+
#>
43+
# LogEventLevel: Verbose=0, Debug=1, Information=2, ...
44+
if ([int]$levelSwitch.MinimumLevel -le 1) {
45+
return $true
46+
}
47+
else {
48+
return $false
49+
}
50+
}
51+
52+
53+
54+
55+
Write-DebugLog "LoggingHelper.ps1 loaded"

docs/content/docs/reference/endpoints/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ short_title: Endpoints
44
description: |
55
This section provides an overview of the endpoints used in the Azure DevOps Migration Tools, including their configuration and usage.Endpoints are used to define the access to TFS/Azure DevOps servers. They are used to connect to the source and target servers for migration.
66
date: 2025-06-24T12:07:31Z
7-
---
7+
discussionId: 2799
88

9+
---
910
Endpoints are defined in the `endpoints` section of the configuration file. Each endpoint must have a unique name and specify the type of server it connects to, such as Azure DevOps Services, Azure DevOps Server, or TFS.

docs/content/docs/reference/endpoints/file-system-work-item-endpoint/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ description: |
55
dataFile: data/reference.endpoints.filesystemworkitemendpoint.yaml
66
slug: file-system-work-item-endpoint
77
aliases:
8-
- /docs/Reference/Endpoints/FileSystemWorkItemEndpoint
9-
- /Reference/Endpoints/FileSystemWorkItemEndpoint
10-
- /learn/azure-devops-migration-tools/Reference/Endpoints/FileSystemWorkItemEndpoint
11-
- /learn/azure-devops-migration-tools/Reference/Endpoints/FileSystemWorkItemEndpoint/index.md
8+
- /docs/Reference/Endpoints/FileSystemWorkItemEndpoint
9+
- /Reference/Endpoints/FileSystemWorkItemEndpoint
10+
- /learn/azure-devops-migration-tools/Reference/Endpoints/FileSystemWorkItemEndpoint
11+
- /learn/azure-devops-migration-tools/Reference/Endpoints/FileSystemWorkItemEndpoint/index.md
1212
date: 2025-06-24T12:07:31Z
13-
---
13+
discussionId: 2797
1414

15+
---
1516
{{< class-description >}}
1617

1718
## Options

docs/content/docs/reference/endpoints/tfs-endpoint/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ description: |
55
dataFile: data/reference.endpoints.tfsendpoint.yaml
66
slug: tfs-endpoint
77
aliases:
8-
- /docs/Reference/Endpoints/TfsEndpoint
9-
- /Reference/Endpoints/TfsEndpoint
10-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsEndpoint
11-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsEndpoint/index.md
8+
- /docs/Reference/Endpoints/TfsEndpoint
9+
- /Reference/Endpoints/TfsEndpoint
10+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsEndpoint
11+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsEndpoint/index.md
1212
date: 2025-06-24T12:07:31Z
13-
---
13+
discussionId: 2796
1414

15+
---
1516
{{< class-description >}}
1617

1718
## Options

docs/content/docs/reference/endpoints/tfs-team-project-endpoint/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ description: |
55
dataFile: data/reference.endpoints.tfsteamprojectendpoint.yaml
66
slug: tfs-team-project-endpoint
77
aliases:
8-
- /docs/Reference/Endpoints/TfsTeamProjectEndpoint
9-
- /Reference/Endpoints/TfsTeamProjectEndpoint
10-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamProjectEndpoint
11-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamProjectEndpoint/index.md
8+
- /docs/Reference/Endpoints/TfsTeamProjectEndpoint
9+
- /Reference/Endpoints/TfsTeamProjectEndpoint
10+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamProjectEndpoint
11+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamProjectEndpoint/index.md
1212
date: 2025-06-24T12:07:31Z
13-
---
13+
discussionId: 2795
1414

15+
---
1516
{{< class-description >}}
1617

1718
## Options

docs/content/docs/reference/endpoints/tfs-team-settings-endpoint/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ description: |
55
dataFile: data/reference.endpoints.tfsteamsettingsendpoint.yaml
66
slug: tfs-team-settings-endpoint
77
aliases:
8-
- /docs/Reference/Endpoints/TfsTeamSettingsEndpoint
9-
- /Reference/Endpoints/TfsTeamSettingsEndpoint
10-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamSettingsEndpoint
11-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamSettingsEndpoint/index.md
8+
- /docs/Reference/Endpoints/TfsTeamSettingsEndpoint
9+
- /Reference/Endpoints/TfsTeamSettingsEndpoint
10+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamSettingsEndpoint
11+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamSettingsEndpoint/index.md
1212
date: 2025-06-24T12:07:31Z
13-
---
13+
discussionId: 2794
1414

15+
---
1516
{{< class-description >}}
1617

1718
## Options

docs/content/docs/reference/endpoints/tfs-work-item-endpoint/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ description: |
55
dataFile: data/reference.endpoints.tfsworkitemendpoint.yaml
66
slug: tfs-work-item-endpoint
77
aliases:
8-
- /docs/Reference/Endpoints/TfsWorkItemEndpoint
9-
- /Reference/Endpoints/TfsWorkItemEndpoint
10-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsWorkItemEndpoint
11-
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsWorkItemEndpoint/index.md
8+
- /docs/Reference/Endpoints/TfsWorkItemEndpoint
9+
- /Reference/Endpoints/TfsWorkItemEndpoint
10+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsWorkItemEndpoint
11+
- /learn/azure-devops-migration-tools/Reference/Endpoints/TfsWorkItemEndpoint/index.md
1212
date: 2025-06-24T12:07:31Z
13-
---
13+
discussionId: 2793
1414

15+
---
1516
{{< class-description >}}
1617

1718
## Options

0 commit comments

Comments
 (0)