mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-23 09:48:14 +00:00
GitHub: Mint cred only for merged PRs (#1933)
This commit modifies the GitHub createGraph method so that it now returns a WeightedGraph, and that WeightedGraph sets weight 0 for any pull request which hasn't been merged. This improves Cred robustness, since it's easy to (non-maliciously) create a bunch of unmerged PRs, but getting them merged is a signal of quality. Test plan: Unit tests added.
This commit is contained in:
parent
e54b0a3f5b
commit
4b49f48911
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3320,3 +3320,12 @@ Array [
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`plugins/github/createGraph example weights matches snapshot 1`] = `
|
||||
Object {
|
||||
"edgeWeights": Map {},
|
||||
"nodeWeights": Map {
|
||||
"N |