mirror of
https://github.com/actions/checkout.git
synced 2026-02-01 06:06:30 +00:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d4d52a9288
commit
dbf1fa69f1
@ -738,7 +738,9 @@ class GitCommandManager {
|
|||||||
// Sanitize the orchestration ID to ensure it contains only valid characters
|
// Sanitize the orchestration ID to ensure it contains only valid characters
|
||||||
// Valid characters: 0-9, a-z, _, -, .
|
// Valid characters: 0-9, a-z, _, -, .
|
||||||
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_')
|
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_')
|
||||||
gitHttpUserAgent = `${gitHttpUserAgent} actions_orchestration_id/${sanitizedId}`
|
if (sanitizedId.trim().length > 0) {
|
||||||
|
gitHttpUserAgent = `${gitHttpUserAgent} actions_orchestration_id/${sanitizedId}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug(`Set git useragent to: ${gitHttpUserAgent}`)
|
core.debug(`Set git useragent to: ${gitHttpUserAgent}`)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user