Compare commits

...

5 Commits

Author SHA1 Message Date
Pascal Weyprecht dbf1108af5
Merge c974278bdf into df4cb1c069 2026-06-03 10:29:48 +08:00
Yashwanth Anantharaju df4cb1c069
Update changelog for v6.0.3 (#2446) 2026-06-02 10:31:30 -04:00
fx c974278bdf Merge branch 'main' of https://github.com/fx-world/checkout.git into main 2026-05-13 22:26:13 +02:00
fx b5005fef89 allow for subpaths in GITHUB_SERVER_URL 2026-05-13 22:26:01 +02:00
fx 8e600906a0 allow for subpaths in GITHUB_SERVER_URL 2026-05-13 21:15:34 +02:00
3 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## v6.0.3
* Fix checkout init for SHA-256 repositories by @yaananth in https://github.com/actions/checkout/pull/2439
* fix: expand merge commit SHA regex and add SHA-256 test cases by @yaananth in https://github.com/actions/checkout/pull/2414
## v6.0.2
* Fix tag handling: preserve annotations and explicit fetch-tags by @ericsciple in https://github.com/actions/checkout/pull/2356

3
dist/index.js vendored
View File

@ -2780,7 +2780,8 @@ function getFetchUrl(settings) {
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
const serviceUrlBase = pruneSuffix(`${serviceUrl.origin}${serviceUrl.pathname}`, '/');
return `${serviceUrlBase}/${encodedOwner}/${encodedName}`;
}
function getServerUrl(url) {
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';

View File

@ -17,7 +17,11 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
const serviceUrlBase = pruneSuffix(
`${serviceUrl.origin}${serviceUrl.pathname}`,
'/'
)
return `${serviceUrlBase}/${encodedOwner}/${encodedName}`
}
export function getServerUrl(url?: string): URL {