diff --git a/src/plugins/github/porcelain.js b/src/plugins/github/porcelain.js index fafeea1..bcca92a 100644 --- a/src/plugins/github/porcelain.js +++ b/src/plugins/github/porcelain.js @@ -133,6 +133,12 @@ export class Porcelain { } return repo[0]; } + + authors(): Author[] { + return this.graph + .nodes({type: AUTHOR_NODE_TYPE}) + .map((n) => new Author(this.graph, n.address)); + } } class GithubEntity { @@ -200,12 +206,6 @@ export class Repository extends GithubEntity { .nodes({type: PULL_REQUEST_NODE_TYPE}) .map((n) => new PullRequest(this.graph, n.address)); } - - authors(): Author[] { - return this.graph - .nodes({type: AUTHOR_NODE_TYPE}) - .map((n) => new Author(this.graph, n.address)); - } } class Post< diff --git a/src/plugins/github/porcelain.test.js b/src/plugins/github/porcelain.test.js index f80bd3c..f16d5b7 100644 --- a/src/plugins/github/porcelain.test.js +++ b/src/plugins/github/porcelain.test.js @@ -150,7 +150,7 @@ describe("GitHub porcelain", () => { }); it("Authors", () => { - const authors = repo.authors(); + const authors = porcelain.authors(); // So we don't need to manually update the test if a new person posts expect(authors.length).toMatchSnapshot();