mirror of
https://github.com/actions/toolkit.git
synced 2026-08-07 00:00:18 +02:00
Rename github_orchestration_id to actions_orchestration_id
Co-authored-by: TingluoHuang <[email protected]>
This commit is contained in:
co-authored by
TingluoHuang
parent
20596c1d96
commit
1dc58e3080
@@ -387,7 +387,7 @@ describe('basics', () => {
|
|||||||
const body: string = await res.readBody()
|
const body: string = await res.readBody()
|
||||||
const obj = JSON.parse(body)
|
const obj = JSON.parse(body)
|
||||||
expect(obj.headers['user-agent']).toBe(
|
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']
|
delete process.env['ACTIONS_ORCHESTRATION_ID']
|
||||||
@@ -406,7 +406,7 @@ describe('basics', () => {
|
|||||||
const obj = JSON.parse(body)
|
const obj = JSON.parse(body)
|
||||||
// Spaces, parentheses, and slashes should be replaced with underscores
|
// Spaces, parentheses, and slashes should be replaced with underscores
|
||||||
expect(obj.headers['user-agent']).toBe(
|
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']
|
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
|
// Sanitize the orchestration ID to ensure it contains only valid token characters
|
||||||
// Valid characters: alphanumeric, !, #, $, %, &, ', *, +, -, ., ^, _, `, |, ~
|
// Valid characters: alphanumeric, !, #, $, %, &, ', *, +, -, ., ^, _, `, |, ~
|
||||||
const sanitizedId = orchId.replace(/[^a-zA-Z0-9!#$%&'*+.^_`|~-]/g, '_')
|
const sanitizedId = orchId.replace(/[^a-zA-Z0-9!#$%&'*+.^_`|~-]/g, '_')
|
||||||
return `${userAgent} github_orchestration_id/${sanitizedId}`
|
return `${userAgent} actions_orchestration_id/${sanitizedId}`
|
||||||
}
|
}
|
||||||
return userAgent
|
return userAgent
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user