export default (buildDefinitions) => {
    const buildDefinitionsByRepoId = buildDefinitions.reduce((acc, buildDefinition) => {
        const repoId = buildDefinition.repositoryId || 'no-repo-id';
        acc[repoId] = acc[repoId] || [];
        acc[repoId].push(buildDefinition);
        return acc;
    }, {});
    return (repoId) => buildDefinitionsByRepoId[repoId] || [];
};
