Skip to content

Commit 2220b63

Browse files
committed
Bugfixes
1 parent be734f4 commit 2220b63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $useHeaderForWikiName = Get-ActionInput useHeaderForWikiName
1717
$customWikiFileHeaderFormat = Get-ActionInput customWikiFileHeaderFormat
1818

1919
$repositoryName = $env:GITHUB_REPOSITORY
20+
2021
$repositoryUrl = "https://github.com/$repositoryName"
2122
$repositoryCloneUrl = "https://$githubToken@github.com/$repositoryName"
2223

@@ -212,7 +213,8 @@ Function AddCustomHeader()
212213

213214
$header = $customWikiFileHeaderFormat
214215

215-
$sourceFileLink = "$repositoryUrl/blob/$defaultBranch/$($directories -join "/")/$($fileName)"
216+
$relativePath = "$rootDocsFolder/$($directories -join "/")"
217+
$sourceFileLink = "$repositoryUrl/blob/$defaultBranch/$relativePath/$($fileName)"
216218
$header = $header -replace "{sourceFileLink}", $sourceFileLink
217219

218220
@($header, "`n", "`n") + $content

0 commit comments

Comments
 (0)