git ssb

0+

Kira / %V53yIAO6ZNGv1Lx9tCP…



forked from cel / ssb-issues

Commit 0099a6481da34ffa656cc6b1699549145fe444b7

Update to not use old schema

Fix %A0SFOAE32PqB38IlBRUdptjKAeKy/QgT76YYSCWdFT4=.sha256
cel committed on 11/4/2016, 11:37:59 PM
Parent: 0e95f2aac8609383058d181c4903b7b858eaa2b8

Files changed

README.mdchanged
lib/schemas.jschanged
README.mdView
@@ -16,19 +16,25 @@
1616 text: string?
1717 }
1818 ```
1919
20-#### type: issue-edit
20+#### issue edits
2121
22-An edit to an issue. Only considered valid if its author is the author of the
22+Edits to an issue may be done by any ssb message type. For example, you can
23+make a post that updates an issue, or push a git commit that updates an issue.
24+If the message does not have any content other than to update the issue, then
25+the type may be `issue-edit`.
26+
27+An issue edit is only considered valid if its author is the author of the
2328 issue (`issue.author`) or of the project of the issue (`issue.projectAuthor`).
2429
2530 ```js
2631 {
27- type: 'issue-edit',
28- issue: IssueRef,
29- open: boolean?,
30- title: string?
32+ type: 'issue-edit'|'post'|'git-update',
33+ issues: [{
34+ link: IssueRef,
35+ open: boolean,
36+ }]
3137 }
3238 ```
3339
3440 ## API
lib/schemas.jsView
@@ -28,14 +28,16 @@
2828 if (!ssbRef.isMsg(id))
2929 throw new Error('invalid issue id')
3030 var msg = {
3131 type: 'issue-edit',
32- issue: id
32+ issues: [{
33+ link: id
34+ }]
3335 }
3436 if (opts.open != null)
35- msg.open = opts.open
37+ msg.issues[0].open = opts.open
3638 if (opts.title != null)
37- msg.title = opts.title
39+ msg.issues[0].title = opts.title
3840 return msg
3941 }
4042
4143 exports.close = function (id) {

Built with git-ssb-web