Commit 207f58e 1 parent fe8ca8d commit 207f58e Copy full SHA for 207f58e
File tree 1 file changed +10
-12
lines changed
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -16,26 +16,24 @@ async function main() {
16
16
core . info ( `> ${ name } : ${ value } ` ) ;
17
17
}
18
18
19
- core . debug ( `route: ${ inspect ( route ) } ` ) ;
20
- core . debug ( `parameters: ${ inspect ( parameters ) } ` ) ;
21
- core . debug (
22
- `parsed request options: ${ inspect (
23
- octokit . request . endpoint ( route , parameters )
24
- ) } `
25
- ) ;
26
-
27
- const time = Date . now ( ) ;
28
-
29
19
// workaround for https://github.com/octokit/request-action/issues/71
30
20
// un-encode "repo" in /repos/{repo} URL when "repo" parameter is set to ${{ github.repository }}
31
21
const options = octokit . request . endpoint ( route , parameters ) ;
32
- const { status , headers , data } = await octokit . request ( {
22
+ const requestOptions = {
33
23
...options ,
34
24
url : options . url . replace (
35
25
/ \/ r e p o s \/ ( [ ^ / ] + ) / ,
36
26
( _ , match ) => "/repos/" + decodeURIComponent ( match )
37
27
) ,
38
- } ) ;
28
+ } ;
29
+
30
+ core . debug ( `route: ${ inspect ( route ) } ` ) ;
31
+ core . debug ( `parameters: ${ inspect ( parameters ) } ` ) ;
32
+ core . debug ( `parsed request options: ${ inspect ( requestOptions ) } ` ) ;
33
+
34
+ const time = Date . now ( ) ;
35
+
36
+ const { status, headers, data } = await octokit . request ( requestOptions ) ;
39
37
40
38
core . info ( `< ${ status } ${ Date . now ( ) - time } ms` ) ;
41
39
You can’t perform that action at this time.
0 commit comments