Remove src/tools/loadCombinedGraph (#326)

It was not used anywhere.

Test plan: Travis

Paired with @wchargin
This commit is contained in:
Dandelion Mané 2018-06-01 17:12:13 -07:00 committed by GitHub
parent 40409f3151
commit 797a2fbf9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]));
}