@@ -9,7 +9,7 @@ async function run() {
9
9
const repository = core . getInput ( 'repository' ) ;
10
10
const isReadmeUpdate = core . getInput ( 'isReadmeUpdate' ) ;
11
11
const safeUserList = core . getInput ( 'safeUserList' ) . split ( "," ) ;
12
-
12
+
13
13
const username = repository . split ( "/" ) [ 0 ] ;
14
14
const reponame = repository . split ( "/" ) [ 1 ] ;
15
15
const octokit = new Octokit ( { auth : `token ${ token } ` } ) ;
@@ -53,7 +53,7 @@ async function run() {
53
53
async function queryFollowingUnfollowingUsers ( unfollowing , index = 0 ) {
54
54
const follower = unfollowing . next ( ) ;
55
55
if ( ! follower . done ) {
56
- const uusername = unfollower . value [ 1 ] . login ;
56
+ const uusername = follower . value [ 1 ] . login ;
57
57
await octokit . users . follow ( { username : uusername } ) ;
58
58
await queryFollowingUnfollowingUsers ( unfollowing ) ;
59
59
}
@@ -70,7 +70,7 @@ async function run() {
70
70
}
71
71
return "-" ;
72
72
}
73
-
73
+
74
74
async function checkFileExistence ( ) {
75
75
try {
76
76
const { data : { sha } } = await octokit . repos . getReadme ( {
@@ -109,7 +109,7 @@ async function run() {
109
109
if ( unfollowing . length > 0 ) {
110
110
await queryFollowingUnfollowingUsers ( unfollowing . entries ( ) ) ;
111
111
console . log ( `You followed the ${ unfollowing . length } good guy${ unfollowing . length > 1 ? 's' : '' } .` ) ;
112
- }
112
+ }
113
113
114
114
if ( isReadmeUpdate ) {
115
115
if ( unfollowers . length > 0 || unfollowing . length > 0 ) {
@@ -127,7 +127,7 @@ async function run() {
127
127
<table width="100%">
128
128
${ formatTable ( followers ) }
129
129
</table>
130
-
130
+
131
131
## LICENSE
132
132
Copyright (c) 2023-present [Huniko519](https://github.com/Huniko519)
133
133
` ;
@@ -154,7 +154,7 @@ Copyright (c) 2023-present [Huniko519](https://github.com/Huniko519)
154
154
await octokit . repos . createOrUpdateFileContents ( requestData ) ;
155
155
}
156
156
}
157
-
157
+
158
158
console . log ( "Done!" ) ;
159
159
} catch ( error ) {
160
160
console . log ( error . message ) ;
0 commit comments