@@ -8,6 +8,7 @@ import {requestLog} from '@octokit/plugin-request-log'
88import { retry } from '@octokit/plugin-retry'
99import { RequestRequestOptions } from '@octokit/types'
1010import { callAsyncFunction } from './async-function'
11+ import { createConfiguredGetOctokit } from './create-configured-getoctokit'
1112import { RetryOptions , getRetryOptions , parseNumberArray } from './retry-options'
1213import { wrapRequire } from './wrap-require'
1314
@@ -59,13 +60,24 @@ async function main(): Promise<void> {
5960 const github = getOctokit ( token , opts , retry , requestLog )
6061 const script = core . getInput ( 'script' , { required : true } )
6162
63+ // Wrap getOctokit so secondary clients inherit retry, logging,
64+ // orchestration ID, and the action's retries input.
65+ // Deep-copy opts to prevent shared references with the primary client.
66+ const configuredGetOctokit = createConfiguredGetOctokit (
67+ getOctokit ,
68+ { ...opts , retry : { ...opts . retry } , request : { ...opts . request } } ,
69+ retry ,
70+ requestLog
71+ )
72+
6273 // Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
6374 const result = await callAsyncFunction (
6475 {
6576 require : wrapRequire ,
6677 __original_require__ : __non_webpack_require__ ,
6778 github,
6879 octokit : github ,
80+ getOctokit : configuredGetOctokit ,
6981 context,
7082 core,
7183 exec,
0 commit comments