Rename github_orchestration_id to actions_orchestration_id
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
This commit is contained in:
@@ -387,7 +387,7 @@ describe('basics', () => {
|
||||
const body: string = await res.readBody()
|
||||
const obj = JSON.parse(body)
|
||||
expect(obj.headers['user-agent']).toBe(
|
||||
`http-client-tests github_orchestration_id/${orchId}`
|
||||
`http-client-tests actions_orchestration_id/${orchId}`
|
||||
)
|
||||
|
||||
delete process.env['ACTIONS_ORCHESTRATION_ID']
|
||||
@@ -406,7 +406,7 @@ describe('basics', () => {
|
||||
const obj = JSON.parse(body)
|
||||
// Spaces, parentheses, and slashes should be replaced with underscores
|
||||
expect(obj.headers['user-agent']).toBe(
|
||||
'http-client-tests github_orchestration_id/test__with__special_chars'
|
||||
'http-client-tests actions_orchestration_id/test__with__special_chars'
|
||||
)
|
||||
|
||||
delete process.env['ACTIONS_ORCHESTRATION_ID']
|
||||
|
||||
@@ -823,7 +823,7 @@ export class HttpClient {
|
||||
// Sanitize the orchestration ID to ensure it contains only valid token characters
|
||||
// Valid characters: alphanumeric, !, #, $, %, &, ', *, +, -, ., ^, _, `, |, ~
|
||||
const sanitizedId = orchId.replace(/[^a-zA-Z0-9!#$%&'*+.^_`|~-]/g, '_')
|
||||
return `${userAgent} github_orchestration_id/${sanitizedId}`
|
||||
return `${userAgent} actions_orchestration_id/${sanitizedId}`
|
||||
}
|
||||
return userAgent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user