mirror of
https://github.com/actions/github-script.git
synced 2026-06-06 09:04:23 +00:00
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)
This commit is contained in:
parent
450193c5ab
commit
dae91cface
9 changed files with 602 additions and 9 deletions
2
types/async-function.d.ts
vendored
2
types/async-function.d.ts
vendored
|
|
@ -3,6 +3,7 @@ import * as core from '@actions/core';
|
|||
import * as exec from '@actions/exec';
|
||||
import { Context } from '@actions/github/lib/context';
|
||||
import { GitHub } from '@actions/github/lib/utils';
|
||||
import { getOctokit } from '@actions/github';
|
||||
import * as glob from '@actions/glob';
|
||||
import * as io from '@actions/io';
|
||||
export declare type AsyncFunctionArguments = {
|
||||
|
|
@ -10,6 +11,7 @@ export declare type AsyncFunctionArguments = {
|
|||
core: typeof core;
|
||||
github: InstanceType<typeof GitHub>;
|
||||
octokit: InstanceType<typeof GitHub>;
|
||||
getOctokit: typeof getOctokit;
|
||||
exec: typeof exec;
|
||||
glob: typeof glob;
|
||||
io: typeof io;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue