| … | … | @@ -0,0 +1,45 @@ |
| 1 | # hyper-issues |
| 2 | |
| 3 | P2P issue tracking — a `hyper-rooms` schema for issues, comments, |
| 4 | labels, and refs (commit/PR cross-links). |
| 5 | |
| 6 | One Autobase per repo (the issue tracker is a Room). Multi-writer: |
| 7 | anyone with the bootstrap key can read; writers added by the |
| 8 | repo's permission graph (typically `pear-git-v3` orchestrates this). |
| 9 | |
| 10 | Used by `pear-git-v3`'s `IssueRegistry`, which lazy-loads one |
| 11 | `HyperIssues` per repo on demand. |
| 12 | |
| 13 | ## Usage |
| 14 | |
| 15 | ```js |
| 16 | import { HyperIssues } from 'hyper-issues' |
| 17 | |
| 18 | const issues = new HyperIssues(corestore, { |
| 19 | bootstrapKey: existingTrackerKey || null, |
| 20 | namespace: 'repo-abc123' |
| 21 | }) |
| 22 | await issues.ready() |
| 23 | |
| 24 | await issues.createIssue({ id: 1, title: 'Bug', body: '...', authorId: alice }) |
| 25 | await issues.addComment({ issueId: 1, body: 'thoughts', authorId: bob }) |
| 26 | await issues.setLabels({ issueId: 1, labels: ['bug', 'p1'] }) |
| 27 | await issues.close({ issueId: 1, closedBy: alice }) |
| 28 | ``` |
| 29 | |
| 30 | ## Schema |
| 31 | |
| 32 | See `lib/schema.js` for ops. `DEFAULT_LABELS` is the seed set |
| 33 | (`bug`, `feature`, `question`, ...). |
| 34 | |
| 35 | ## Tests |
| 36 | |
| 37 | ```bash |
| 38 | npm test |
| 39 | ``` |
| 40 | |
| 41 | ## Related |
| 42 | |
| 43 | - `hyper-rooms` — the underlying Room class. |
| 44 | - `pear-git-v3` — `IssueRegistry` opens one Room per repo. |
| 45 | - `hyper-orgs` — sibling room schema. |