mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-17 06:56:36 +00:00
Remove src/tools/loadCombinedGraph
(#326)
It was not used anywhere. Test plan: Travis Paired with @wchargin
This commit is contained in:
parent
40409f3151
commit
797a2fbf9f
@ -1,35 +0,0 @@
|
||||
// @flow
|
||||
|
||||
import cloneGitGraph from "../plugins/git/cloneGitGraph";
|
||||
import fetchGithubGraph from "../plugins/github/fetchGithubGraph";
|
||||
import type {
|
||||
NodePayload as GithubNodePayload,
|
||||
EdgePayload as GithubEdgePayload,
|
||||
} from "../plugins/github/types";
|
||||
import type {
|
||||
NodePayload as GitNodePayload,
|
||||
EdgePayload as GitEdgePayload,
|
||||
} from "../plugins/git/types";
|
||||
import {Graph} from "../core/graph";
|
||||
|
||||
export type NodePayload = GitNodePayload | GithubNodePayload;
|
||||
export type EdgePayload = GitEdgePayload | GithubEdgePayload;
|
||||
/**
|
||||
* Load a cross-plugin contribution graph for the given GitHub repo
|
||||
*
|
||||
* @param {String} repoOwner
|
||||
* the GitHub username of the owner of the repository to be cloned
|
||||
* @param {String} repoName
|
||||
* the name of the repository to be cloned
|
||||
* @return {Promise<Graph>}
|
||||
* a Promise containing the combined contribution graph
|
||||
*/
|
||||
export function loadCombinedGraph(
|
||||
repoOwner: string,
|
||||
repoName: string,
|
||||
token: string
|
||||
): Promise<Graph> {
|
||||
const githubGraphPromise = fetchGithubGraph(repoOwner, repoName, token);
|
||||
const gitGraph = cloneGitGraph(repoOwner, repoName);
|
||||
return githubGraphPromise.then((x) => Graph.mergeConservative([gitGraph, x]));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user