Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 4 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

## [1.1.0](https://github.com/hesreallyhim/github-api-usage-tracker/compare/github-api-usage-tracker-v1.0.2...github-api-usage-tracker-v1.1.0) (2026-01-21)


### Features

* Add summary table, configurable buckets, and improve logging ([bee0b09](https://github.com/hesreallyhim/github-api-usage-tracker/commit/bee0b09065b97deb97b8c8b3852045b5913703fd))

- Add summary table, configurable buckets, and improve logging ([bee0b09](https://github.com/hesreallyhim/github-api-usage-tracker/commit/bee0b09065b97deb97b8c8b3852045b5913703fd))

### Bug Fixes

* fix bug in summary table construction ([5c01101](https://github.com/hesreallyhim/github-api-usage-tracker/commit/5c011018de3a79a650a0755a6fa691888fc22ea8))
* typo ([c2bea0a](https://github.com/hesreallyhim/github-api-usage-tracker/commit/c2bea0a114599def38897054bb6dee525d84eff2))
* usage accounting across windows ([bab40c4](https://github.com/hesreallyhim/github-api-usage-tracker/commit/bab40c4af552ebc76e77ac4e9d2e121cac69b430))
- fix bug in summary table construction ([5c01101](https://github.com/hesreallyhim/github-api-usage-tracker/commit/5c011018de3a79a650a0755a6fa691888fc22ea8))
- typo ([c2bea0a](https://github.com/hesreallyhim/github-api-usage-tracker/commit/c2bea0a114599def38897054bb6dee525d84eff2))
- usage accounting across windows ([bab40c4](https://github.com/hesreallyhim/github-api-usage-tracker/commit/bab40c4af552ebc76e77ac4e9d2e121cac69b430))
13 changes: 12 additions & 1 deletion dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@ class HttpClient {
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
Expand Down Expand Up @@ -2706,6 +2706,17 @@ class HttpClient {
}
return proxyAgent;
}
_getUserAgentWithOrchestrationId(userAgent) {
const baseUserAgent = userAgent || 'actions/http-client';
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
if (orchId) {
// Sanitize the orchestration ID to ensure it contains only valid characters
// Valid characters: 0-9, a-z, _, -, .
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
}
return baseUserAgent;
}
_performExponentialBackoff(retryNumber) {
return __awaiter(this, void 0, void 0, function* () {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
Expand Down
13 changes: 12 additions & 1 deletion dist/pre/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@ class HttpClient {
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
Expand Down Expand Up @@ -2706,6 +2706,17 @@ class HttpClient {
}
return proxyAgent;
}
_getUserAgentWithOrchestrationId(userAgent) {
const baseUserAgent = userAgent || 'actions/http-client';
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
if (orchId) {
// Sanitize the orchestration ID to ensure it contains only valid characters
// Valid characters: 0-9, a-z, _, -, .
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
}
return baseUserAgent;
}
_performExponentialBackoff(retryNumber) {
return __awaiter(this, void 0, void 0, function* () {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
Expand Down
Loading