Compare commits

..
11 Commits
Author SHA1 Message Date
Salman Muin Kayser Chishti ac0b78015b Merge pull request #2507 from actions/dependabot/npm_and_yarn/packages/github/undici-6.29.0
chore(deps): bump undici from 6.28.0 to 6.29.0 in /packages/github
2026-09-30 10:59:23 +01:00
dependabot[bot] 458fc6250d chore(deps): bump undici from 6.28.0 to 6.29.0 in /packages/github
Bumps [undici](https://github.com/nodejs/undici) from 6.28.0 to 6.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.28.0...v6.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.29.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-29 12:08:16 +00:00
dependabot[bot] ccfa24c062 chore(deps): bump undici from 6.24.0 to 6.28.0 in /packages/github
Bumps [undici](https://github.com/nodejs/undici) from 6.24.0 to 6.28.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.24.0...v6.28.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.28.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-26 16:14:19 +00:00
Aiqiao Yan 48fd1c0beb Merge pull request #2383 from actions/aiqiaoy/release-new-versions
release new versions for a few packages
2026-04-21 15:52:32 -04:00
Aiqiao Yan 0e0f3da65b release new versions for a few packages 2026-04-21 17:15:02 +00:00
Aiqiao Yan a09873d5db Merge pull request #2346 from actions/dependabot/npm_and_yarn/packages/github/undici-6.24.0
chore(deps): bump undici from 6.23.0 to 6.24.0 in /packages/github
2026-04-21 12:55:26 -04:00
Salman Chishti 9d7c0f9726 Merge pull request #2366 from salmanmkc/salmanmkc/github-9.1.0-release
chore: bump @actions/github to 9.1.0 for release
2026-04-08 21:11:16 +01:00
Salman Chishti 2f61df9654 chore: bump @actions/github to 9.1.0 for release
- Version bump 9.0.0 → 9.1.0 in package.json
- Update RELEASES.md with idempotency guard note and PR link
2026-04-08 20:07:19 +00:00
Salman Chishti 892de51ec2 style: fix prettier formatting in orchestration tests 2026-04-08 19:38:31 +00:00
Salman Chishti 0b265950d7 fix: prevent duplicate orchestration ID in user-agent
Add idempotency check to getUserAgentWithOrchestrationId — if the
tag is already present in baseUserAgent, return it unchanged. This
prevents doubling when both the exported helper and getOctokitOptions
run for the same client.
2026-04-08 16:49:32 +00:00
dependabot[bot] 313e43e935 chore(deps): bump undici from 6.23.0 to 6.24.0 in /packages/github
Bumps [undici](https://github.com/nodejs/undici) from 6.23.0 to 6.24.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.24.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 04:56:28 +00:00
5 changed files with 30 additions and 9 deletions

No files matched your search

+5 -2
View File
@@ -1,9 +1,12 @@
# @actions/github Releases # @actions/github Releases
### 9.1.1
- Bump `undici` from `6.23.0` to `6.24.0` [#2346](https://github.com/actions/toolkit/pull/2346)
### 9.1.0 ### 9.1.0
- Append `actions_orchestration_id` to user-agent when `ACTIONS_ORCHESTRATION_ID` environment variable is set - Append `actions_orchestration_id` to user-agent when the `ACTIONS_ORCHESTRATION_ID` environment variable is set [#2364](https://github.com/actions/toolkit/pull/2364)
- Export `getUserAgentWithOrchestrationId` from `@actions/github/lib/utils` for downstream consumers
### 9.0.0 ### 9.0.0
+16
View File
@@ -59,6 +59,12 @@ describe('orchestration ID support', () => {
process.env['ACTIONS_ORCHESTRATION_ID'] = ' ' process.env['ACTIONS_ORCHESTRATION_ID'] = ' '
expect(getUserAgentWithOrchestrationId('my-app')).toBe('my-app') expect(getUserAgentWithOrchestrationId('my-app')).toBe('my-app')
}) })
it('does not duplicate orchestration ID if already present in base', () => {
process.env['ACTIONS_ORCHESTRATION_ID'] = 'abc-123'
const alreadyTagged = 'my-app actions_orchestration_id/abc-123'
expect(getUserAgentWithOrchestrationId(alreadyTagged)).toBe(alreadyTagged)
})
}) })
describe('public re-export', () => { describe('public re-export', () => {
@@ -110,5 +116,15 @@ describe('orchestration ID support', () => {
const opts = getOctokitOptions('fake-token') const opts = getOctokitOptions('fake-token')
expect(opts.userAgent).toBe('actions_orchestration_id/bad_chars_here_') expect(opts.userAgent).toBe('actions_orchestration_id/bad_chars_here_')
}) })
it('does not duplicate orchestration ID when caller already applied it', () => {
process.env['ACTIONS_ORCHESTRATION_ID'] = 'test-orch-id'
const opts = getOctokitOptions('fake-token', {
userAgent: 'my-app actions_orchestration_id/test-orch-id'
})
expect(opts.userAgent).toBe(
'my-app actions_orchestration_id/test-orch-id'
)
})
}) })
}) })
+5 -5
View File
@@ -1,12 +1,12 @@
{ {
"name": "@actions/github", "name": "@actions/github",
"version": "9.0.0", "version": "9.1.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@actions/github", "name": "@actions/github",
"version": "9.0.0", "version": "9.1.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/http-client": "^3.0.2", "@actions/http-client": "^3.0.2",
@@ -363,9 +363,9 @@
} }
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "6.23.0", "version": "6.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz",
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==", "integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=18.17" "node": ">=18.17"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@actions/github", "name": "@actions/github",
"version": "9.0.0", "version": "9.1.1",
"description": "Actions github lib", "description": "Actions github lib",
"keywords": [ "keywords": [
"github", "github",
+3 -1
View File
@@ -49,8 +49,10 @@ export function getUserAgentWithOrchestrationId(
const orchId = process.env['ACTIONS_ORCHESTRATION_ID']?.trim() const orchId = process.env['ACTIONS_ORCHESTRATION_ID']?.trim()
if (orchId) { if (orchId) {
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_') const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_')
const tag = `actions_orchestration_id/${sanitizedId}`
if (baseUserAgent?.includes(tag)) return baseUserAgent
const ua = baseUserAgent ? `${baseUserAgent} ` : '' const ua = baseUserAgent ? `${baseUserAgent} ` : ''
return `${ua}actions_orchestration_id/${sanitizedId}` return `${ua}${tag}`
} }
return baseUserAgent return baseUserAgent
} }