Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix user-agent to handle empty string correctly
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
  • Loading branch information
Copilot and TingluoHuang committed Jan 6, 2026
commit c36bdc0a3af49bb7e233895cd63396b412308f6f
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36267,7 +36267,7 @@ async function main() {
const retries = parseInt(core.getInput('retries'));
const exemptStatusCodes = parseNumberArray(core.getInput('retry-exempt-status-codes'));
const [retryOpts, requestOpts] = getRetryOptions(retries, exemptStatusCodes, utils.defaults);
const baseUserAgent = userAgent || 'actions/github-script';
const baseUserAgent = userAgent === '' ? '' : userAgent || 'actions/github-script';
const finalUserAgent = getUserAgentWithOrchestrationId(baseUserAgent);
const opts = {
log: debug ? console : undefined,
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ async function main(): Promise<void> {
defaultGitHubOptions
)

const baseUserAgent = userAgent || 'actions/github-script'
const baseUserAgent =
userAgent === '' ? '' : userAgent || 'actions/github-script'
const finalUserAgent = getUserAgentWithOrchestrationId(baseUserAgent)

const opts: Options = {
Expand Down
Loading