File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20002,6 +20002,19 @@ function getProxyFetch(destinationUrl) {
2000220002function getApiBaseUrl() {
2000320003 return process.env["GITHUB_API_URL"] || "https://api.github.com";
2000420004}
20005+ function getUserAgentWithOrchestrationId(baseUserAgent) {
20006+ var _a;
20007+ const orchId = (_a = process.env["ACTIONS_ORCHESTRATION_ID"]) === null || _a === void 0 ? void 0 : _a.trim();
20008+ if (orchId) {
20009+ const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_");
20010+ const tag = `actions_orchestration_id/${sanitizedId}`;
20011+ if (baseUserAgent === null || baseUserAgent === void 0 ? void 0 : baseUserAgent.includes(tag))
20012+ return baseUserAgent;
20013+ const ua = baseUserAgent ? `${baseUserAgent} ` : "";
20014+ return `${ua}${tag}`;
20015+ }
20016+ return baseUserAgent;
20017+ }
2000520018
2000620019// node_modules/universal-user-agent/index.js
2000720020function getUserAgent() {
@@ -23510,6 +23523,10 @@ function getOctokitOptions(token, options) {
2351023523 if (auth2) {
2351123524 opts.auth = auth2;
2351223525 }
23526+ const userAgent2 = getUserAgentWithOrchestrationId(opts.userAgent);
23527+ if (userAgent2) {
23528+ opts.userAgent = userAgent2;
23529+ }
2351323530 return opts;
2351423531}
2351523532
You can’t perform that action at this time.
0 commit comments