Commit Graph

4 Commits

Author SHA1 Message Date
Salman Chishti dae91cface feat: expose getOctokit factory in script context
Add pre-configured getOctokit factory to the script context, enabling
multi-token workflows directly inside github-script.

- getOctokit(token, opts, ...plugins) inherits action config (retry, userAgent, etc.)
- Deep-merges request and retry options, deduplicates plugins
- stripUndefined prevents baseUrl clobber on GHES
- Integration test job with dynamic repo name (fork-friendly)
- 32 tests passing (15 factory + 4 integration + 6 getOctokit + 7 existing)
2026-04-09 15:59:35 +00:00
Vladimir Starkov 632050422e fix: adjust types 2025-01-31 11:55:53 +01:00
Josh Gross 84903f5182 Remove node-fetch from type 2023-11-08 09:54:09 -05:00
Viktor Lott 56bdc6c318 Expose async-function argument type
We are exposing the async-function argument type for jsDoc
type declaration support. This means that we now could do:
"npm i -D @types/github-script@github:actions/github-script"
and the add:
"@param {import('@types/github-script').AsyncFunctionArguments}
AsyncFunctionArguments".

This could obviously be done in other ways too, like using
"@typed-actions/github-script" instead. But it seems better
to use the actual source repository instead of a third-party
library to import the type declaration.
2023-07-03 13:56:46 +02:00