-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix factorio-mods-helper contributions counting
- Loading branch information
Showing
5 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use fml::github; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
fml::init(); | ||
|
||
let not_forked = github::get_not_forked_repositories().await.not_forked; | ||
|
||
let api_personal = github::as_personal_account(); | ||
for full_name in not_forked { | ||
println!("Forking {}", full_name); | ||
github::fork_repository_without_check(&api_personal, &full_name).await; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use fml::github; | ||
|
||
#[tokio::test] | ||
async fn main() { | ||
fml::init(); | ||
let result = github::get_not_forked_repositories().await; | ||
|
||
let forked_with_diferrent_name = result.forked_with_diferrent_name; | ||
if !forked_with_diferrent_name.is_empty() { | ||
for full_name in &forked_with_diferrent_name { | ||
println!("{}", full_name); | ||
} | ||
panic!("{} repositories have forks with different name", forked_with_diferrent_name.len()); | ||
} | ||
|
||
let not_forked = result.not_forked; | ||
if !not_forked.is_empty() { | ||
for full_name in ¬_forked { | ||
println!("{}", full_name); | ||
} | ||
panic!("{} repositories not forked", not_forked.len()); | ||
} | ||
} |