Commit graph

2 commits

Author SHA1 Message Date
Salman Chishti
f9d72d3f45 fix: rename binding to createOctokit and harden option merging
- Rename context binding from getOctokit to createOctokit to avoid
  SyntaxError when users write const { getOctokit } = require(...)
  in their scripts (~10 public workflows affected)
- Strip undefined values from user options to prevent clobbering
  defaults (e.g. GHES baseUrl)
- Deep-merge retry options alongside request options
- Use nullish coalescing (??) instead of logical OR (||)
- Shallow-copy opts to prevent shared reference mutation
- Add tests: undefined stripping, retry merge, falsy value preservation,
  no mutation of defaults
- 32 tests passing, lint clean, dist rebuilt
2026-04-08 21:40:43 +00:00
Salman Chishti
744020488d test: add getOctokit integration tests for multi-token usage
Verifies the real getOctokit from @actions/github creates functional
Octokit clients when invoked through callAsyncFunction, ensuring:
- Secondary clients have full REST/GraphQL API surface
- Secondary clients are independent from primary github client
- GHES base URL option is accepted
- Multiple tokens produce distinct client instances
2026-04-07 16:02:54 +00:00