File tree Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Original file line number Diff line number Diff line change
1
+ root = true
2
+
3
+ [* ]
4
+ # charset = utf-8
5
+ # end_of_line = lf
6
+ indent_size = 2
7
+ # indent_style = space
8
+ # insert_final_newline = false
9
+ max_line_length = 140
10
+ # tab_width = 4
11
+ # ij_continuation_indent_size = 8
12
+ # ij_formatter_off_tag = @formatter:off
13
+ # ij_formatter_on_tag = @formatter:on
14
+ # ij_formatter_tags_enabled = false
15
+ # ij_smart_tabs = false
16
+ # ij_wrap_on_typing = false
17
+
Original file line number Diff line number Diff line change 1
1
/* eslint-disable @typescript-eslint/no-explicit-any */
2
2
3
- import { callAsyncFunction } from '../src/async-function '
4
- import { getOctokit } from "@actions/github" ;
5
- import * as fs from "fs" ;
3
+ import { getOctokit } from '@actions/github '
4
+ import * as fs from 'fs'
5
+ import { Octokit } from '@octokit/core'
6
6
7
7
describe ( 'octokit tests' , ( ) => {
8
- test ( 'octoki1' , async ( ) => {
9
- let content = fs . readFileSync ( 'token.txt' , 'utf8' ) ;
10
- console . log ( "token.txt content:" , content )
11
- // getOctokit()
12
- // await callAsyncFunction({} as any, 'console')
8
+ test ( 'mail' , async ( ) => {
9
+ let tokenStr :
8000
string = fs . readFileSync ( 'token.txt' , 'utf8' )
10
+ console . log ( 'token.txt content:' , tokenStr )
11
+ let octokit : Octokit = getOctokit ( tokenStr )
12
+ let mailResponse = await octokit . request ( 'GET /user/emails' )
13
+ console . log ( 'first mail: ' , mailResponse . data [ 0 ] . email )
14
+ expect ( mailResponse . data [ 0 ] . email ) . toEqual ( 'avdim@mail.ru' )
13
15
} )
14
16
} )
Original file line number Diff line number Diff line change 16
16
"pre-commit" : " run-s style:write test build" ,
17
17
"test" : " jest"
18
18
},
19
- "husky " : {
19
+ "huskyOLD " : {
20
20
"hooks" : {
21
21
"pre-commit" : " npm run pre-commit && git add dist/"
22
22
}
You can’t perform that action at this time.
0 commit comments