-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initiatives: define internal datatype Initiative
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// @flow | ||
|
||
import {type NodeAddressT} from "../../core/graph"; | ||
|
||
export type URL = string; | ||
|
||
/** | ||
* An intermediate representation of an Initiative. | ||
* | ||
* This makes the assumption a Champion cannot fail in championing. | ||
* Instead of a success status, they should be removed if unsuccessful. | ||
* | ||
* There is also no timestamp for completion or each edge. | ||
* It should be inferred from the node timestamps instead. | ||
* We can support accurate edge timestamps by interpreting wiki histories. | ||
* However the additional complexity and requirements put on the tracker | ||
* don't seem worthwhile right now. | ||
* Especially because cred can flow even before bounties are released. | ||
* See https://discourse.sourcecred.io/t/write-the-initiatives-plugin/269/6 | ||
*/ | ||
export type Initiative = {| | ||
+title: string, | ||
+timestampMs: number, | ||
+completed: boolean, | ||
+tracker: NodeAddressT, | ||
+dependencies: $ReadOnlyArray<URL>, | ||
+references: $ReadOnlyArray<URL>, | ||
+contributions: $ReadOnlyArray<URL>, | ||
+champions: $ReadOnlyArray<URL>, | ||
|}; |