Skip to content

Commit

Permalink
[factory]: Adding new contributors-and-stargazer group (#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot authored Oct 30, 2023
1 parent fd0bbcc commit 063a3f4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
48 changes: 48 additions & 0 deletions group-generators/generators/contributors-and-stargazer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

import { dataOperators } from "@group-generators/helpers/data-operators";
import { dataProviders } from "@group-generators/helpers/data-providers";
import { Tags, ValueType, GroupWithData } from "topics/group";
import {
GenerationContext,
GenerationFrequency,
GroupGenerator,
} from "topics/group-generator";

// Generated from factory.sismo.io

const generator: GroupGenerator = {

generationFrequency: GenerationFrequency.Weekly,

generate: async (context: GenerationContext): Promise<GroupWithData[]> => {

const githubProvider = new dataProviders.GithubProvider();

const githubProviderData0 = await githubProvider.getRepositoriesContributors({
repositories: [ "anoma/namada" ]
});

const githubProviderData1 = await githubProvider.getRepositoriesStargazers({
repositories: [ "anoma/namada" ]
});

const dataUnion = dataOperators.Union([
githubProviderData0,
githubProviderData1
]);

return [
{
name: "contributors-and-stargazer",
timestamp: context.timestamp,
description: "all Contributors and Stargazer ",
specs: "all Contributors and Stargazer ",
data: dataUnion,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;
2 changes: 2 additions & 0 deletions group-generators/generators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ import community from "./community";
import communitylad from "./communitylad";
import consensysDemoLock from "./consensys-demo-lock";
import contributors from "./contributors";
import contributorsAndStargazer from "./contributors-and-stargazer";
import contributorsOfDataverseCda from "./contributors-of-dataverse-cda";
import cookingRoom from "./cooking-room";
import correctedVersion from "./corrected-version";
Expand Down Expand Up @@ -1051,6 +1052,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"communitylad": communitylad,
"consensys-demo-lock": consensysDemoLock,
"contributors": contributors,
"contributors-and-stargazer": contributorsAndStargazer,
"contributors-of-dataverse-cda": contributorsOfDataverseCda,
"cooking-room": cookingRoom,
"corrected-version": correctedVersion,
Expand Down

0 comments on commit 063a3f4

Please sign in to comment.