Skip to content

Commit

Permalink
fix github user
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Mar 21, 2024
1 parent 808aff4 commit 526a245
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function mirror(repository, gitea, giteaUser, githubToken, giteaOwner) {
await ensureOrg(gitea, giteaOwner,() => mirrorOnGitea(repository, gitea, giteaUser, githubToken, giteaOwner));
}

async function createMirrorsOnGitea(githubRepositories) {
async function createMirrorsOnGitea(githubRepositories, githubUsername) {
const giteaUrl = process.env.GITEA_URL;
if (!giteaUrl) {
console.error('No GITEA_URL specified, please specify! Exiting..');
Expand Down Expand Up @@ -170,7 +170,7 @@ async function singleOrg() {

const githubRepositories = await getGithubRepositories(githubUsername, githubToken, mirrorPrivateRepositories, isOrg);
console.log(`Found ${githubRepositories.length} repositories on github`);
await createMirrorsOnGitea(githubRepositories);
await createMirrorsOnGitea(githubRepositories, githubUsername);

}

Expand All @@ -195,14 +195,11 @@ async function yamlOrg() {
const githubRepositories = await getGithubRepositories(org, githubToken, false, true);
console.log(`\tFound ${githubRepositories.length} repositories on github`);
repos.push(...githubRepositories)

await createMirrorsOnGitea(repos, org);
console.log("waiting 60sec...")
await delay(60000);


}

await createMirrorsOnGitea(repos);

}

let mode = "single";
Expand Down

0 comments on commit 526a245

Please sign in to comment.