Skip to content

Commit

Permalink
Fixed: Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Huniko519 committed Feb 1, 2024
1 parent f6ba25d commit 5670c49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function run() {
const repository = core.getInput('repository');
const isReadmeUpdate = core.getInput('isReadmeUpdate');
const safeUserList = core.getInput('safeUserList').split(",");

const username = repository.split("/")[0];
const reponame = repository.split("/")[1];
const octokit = new Octokit({ auth: `token ${token}` });
Expand Down Expand Up @@ -53,7 +53,7 @@ async function run() {
async function queryFollowingUnfollowingUsers(unfollowing, index = 0) {
const follower = unfollowing.next();
if( !follower.done ) {
const uusername = unfollower.value[1].login;
const uusername = follower.value[1].login;
await octokit.users.follow({username: uusername});
await queryFollowingUnfollowingUsers(unfollowing);
}
Expand All @@ -70,7 +70,7 @@ async function run() {
}
return "-";
}

async function checkFileExistence() {
try {
const { data: { sha }} = await octokit.repos.getReadme({
Expand Down Expand Up @@ -109,7 +109,7 @@ async function run() {
if(unfollowing.length > 0){
await queryFollowingUnfollowingUsers(unfollowing.entries());
console.log(`You followed the ${unfollowing.length} good guy${unfollowing.length > 1 ? 's' : ''}.`);
}
}

if (isReadmeUpdate) {
if(unfollowers.length > 0 || unfollowing.length > 0 ) {
Expand All @@ -127,7 +127,7 @@ async function run() {
<table width="100%">
${formatTable(followers)}
</table>
## LICENSE
Copyright (c) 2023-present [Huniko519](https://github.com/Huniko519)
`;
Expand All @@ -154,7 +154,7 @@ Copyright (c) 2023-present [Huniko519](https://github.com/Huniko519)
await octokit.repos.createOrUpdateFileContents(requestData);
}
}

console.log("Done!");
} catch (error) {
console.log(error.message);
Expand Down

0 comments on commit 5670c49

Please sign in to comment.