mirror of
https://github.com/actions/checkout.git
synced 2026-01-20 23:58:56 +08:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d4d52a9288
commit
dbf1fa69f1
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue