📦️ Build
Some checks are pending
Test / test (push) Waiting to run

This commit is contained in:
marocchino 2026-04-11 08:54:48 +09:00
parent df6c1bd759
commit 0ea0beb66e
No known key found for this signature in database
GPG key ID: F54107506CCF18D0
3 changed files with 20 additions and 2 deletions

18
dist/index.js generated vendored
View file

@ -29150,6 +29150,19 @@ function getProxyFetch(destinationUrl) {
function getApiBaseUrl() {
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
}
function getUserAgentWithOrchestrationId(baseUserAgent) {
var _a;
const orchId = (_a = process.env['ACTIONS_ORCHESTRATION_ID']) === null || _a === void 0 ? void 0 : _a.trim();
if (orchId) {
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
const tag = `actions_orchestration_id/${sanitizedId}`;
if (baseUserAgent === null || baseUserAgent === void 0 ? void 0 : baseUserAgent.includes(tag))
return baseUserAgent;
const ua = baseUserAgent ? `${baseUserAgent} ` : '';
return `${ua}${tag}`;
}
return baseUserAgent;
}
function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
@ -33068,6 +33081,11 @@ function getOctokitOptions(token, options) {
if (auth) {
opts.auth = auth;
}
// Orchestration ID
const userAgent = getUserAgentWithOrchestrationId(opts.userAgent);
if (userAgent) {
opts.userAgent = userAgent;
}
return opts;
}

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "sticky-pull-request-comment",
"version": "3.0.3",
"version": "3.0.4",
"private": true,
"description": "Create comment on pull request, if exists update that comment.",
"main": "lib/main.js",