Commit c08c5ac 1 parent c72844c commit c08c5ac Copy full SHA for c08c5ac
File tree 5 files changed +16
-14
lines changed
5 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
3
- import core from "@actions/core" ;
4
- import { createAppAuth } from "@octokit/auth-app" ;
5
- import { request } from "@octokit/request" ;
6
-
7
3
/**
8
4
* @param {string } appId
9
5
* @param {string } privateKey
10
6
* @param {string } repository
11
- * @param {core } core
12
- * @param {createAppAuth } createAppAuth
13
- * @param {request } request
7
+ * @param {import("@actions/ core") } core
8
+ * @param {import("@octokit/auth-app"). createAppAuth } createAppAuth
9
+ * @param {import("@octokit/request"). request } request
14
10
*/
15
11
export async function main (
16
12
appId ,
@@ -26,6 +22,7 @@ export async function main(
26
22
const auth = createAppAuth ( {
27
23
appId,
28
24
privateKey,
25
+ request,
29
26
} ) ;
30
27
31
28
const appAuthentication = await auth ( {
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
3
- import core from "@actions/core" ;
4
- import { request } from "@octokit/request" ;
5
-
6
3
/**
7
- * @param {core } core
8
- * @param {request } request
4
+ * @param {import("@actions/ core") } core
5
+ * @param {import("@octokit/request"). request } request
9
6
*/
10
7
export async function post ( core , request ) {
11
8
const token = core . getState ( "token" ) ;
Original file line number Diff line number Diff line change
1
+ import { request } from "@octokit/request" ;
2
+
3
+ export default request . defaults ( {
4
+ baseUrl : process . env [ "GITHUB_API_URL" ] ,
5
+ headers : {
6
+ "user-agent" : "actions/create-github-app-token" ,
7
+ } ,
8
+ } ) ;
Original file line number Diff line number Diff line change 2
2
3
3
import core from "@actions/core" ;
4
4
import { createAppAuth } from "@octokit/auth-app" ;
5
- import { request } from "@octokit/request" ;
6
5
7
6
import { main } from "./lib/main.js" ;
7
+ import request from "./lib/request.js" ;
8
8
9
9
if ( ! process . env . GITHUB_REPOSITORY ) {
10
10
throw new Error ( "GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'" ) ;
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
3
3
import core from "@actions/core" ;
4
- import { request } from "@octokit/request" ;
5
4
6
5
import { post } from "./lib/post.js" ;
6
+ import request from "./lib/request.js" ;
7
7
8
8
post (
9
9
core ,
You can’t perform that action at this time.
0 commit comments