This repository was archived by the owner on Jul 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " github-app-token" ,
3
- "version" : " 1.3 .0" ,
3
+ "version" : " 1.4 .0" ,
4
4
"license" : " MIT" ,
5
5
"files" : [
6
6
" action.yml" ,
Original file line number Diff line number Diff line change 1
- import { context , getOctokit } from "@actions/github" ;
1
+ import { getOctokit } from "@actions/github" ;
2
2
import { createAppAuth } from "@octokit/auth-app" ;
3
+ import { request } from "@octokit/request" ;
3
4
4
5
export const fetchInstallationToken = async ( {
5
6
appId,
@@ -12,7 +13,15 @@ export const fetchInstallationToken = async ({
12
13
privateKey : string ;
13
14
repo : string ;
14
15
} > ) : Promise < string > => {
15
- const app = createAppAuth ( { appId, privateKey } ) ;
16
+ const app = createAppAuth ( {
17
+ appId,
18
+ privateKey,
19
+ request : request . defaults ( {
20
+ // GITHUB_API_URL is part of GitHub Actions' built-in environment variables.
21
+ // See https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables.
22
+ baseUrl : process . env [ "GITHUB_API_URL" ]
23
+ } )
24
+ } ) ;
16
25
const authApp = await app ( { type : "app" } ) ;
17
26
const octokit = getOctokit ( authApp . token ) ;
18
27
const {
You can’t perform that action at this time.
0 commit comments