Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ slugify.extend({
"+": "plus"
});

const uniqueByRepositoryKey = (repositories: RepositoryModel[]) =>
Array.from(
repositories.reduce((map, repository) => {
map.set(`${repository.owner}/${repository.name}`, repository);
return map;
}, new Map<string, RepositoryModel>()).values()
);
Comment on lines +98 to +104

// Setup Octokit (GitHub API client)
const MyOctokit = Octokit.plugin(throttling, retry);
const octokit = new MyOctokit({
Expand Down Expand Up @@ -453,7 +461,7 @@ const getRepositories = async (
.sort((a, b) => b.count - a.count);

return {
repositories: repoData.sort(() => Math.random() - 0.5),
repositories: uniqueByRepositoryKey(repoData).sort(() => Math.random() - 0.5),
languages: filterLanguages,
topics: filterTopics
};
Expand Down
4 changes: 1 addition & 3 deletions happycommits.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
"openimis/openimis-dist_dkr",
"openmrs/openmrs-core",
"openmrs/openmrs-contrib-android-client",
"opencrvs/opencrvs-core",
"openkfw/TruBudget",
"OpenSPP/openspp-modules",
"openspp-project/openspp-registry",
Expand Down Expand Up @@ -244,8 +243,7 @@
"vrapeutic/Rodja-webXR",
"WFP-VAM/prism-app",
"WorldHealthOrganization/godata",
"Zenysis/Harmony",
"datakind/Data-Observation-Toolkit"
"Zenysis/Harmony"
],
"labels": [
"good first issue",
Expand Down