git ssb

0+

Kira / %V53yIAO6ZNGv1Lx9tCP…



forked from cel / ssb-issues

Tree: f80a890a7794675d007c3965125971a1405b295b

Files: f80a890a7794675d007c3965125971a1405b295b / README.md

3489 bytesRaw

ssb-issues

Issue tracking built on secure-scuttlebutt

Schema

type: issue

An issue. Represents something that should be fixed.

{
  type: 'issue',
  project: Link?,
  title: string?,
  text: string?
}

type: issue-edit

An edit to an issue. Only considered valid if its author is the author of the issue (issue.author) or of the project of the issue (issue.projectAuthor).

{
  type: 'issue-edit',
  issue: IssueRef,
  open: boolean?,
  title: string?
}

API

var Issues = require('ssb-issues')
var issues = Issues.init(sbot)

get: async

Get an issue by its id

issues.get(issueId, cb)

The resulting issue object is as follows:

{
  id: MsgRef,
  author: FeedRef,
  project: Ref?,
  projectAuthor: FeedRef?,
  created_at: number, 
  updated_at: number,
  open: boolean
}

createFeedStream: source

Get a stream of issues

issues.createFeedStream({ project:, open:, live:, gt:, gte:, lt:, lte:, reverse:, limit:, }, cb)

new: async

Create a new issue

issues.new({ project:, title:, text: }, cb)

close: async

issues.close(id, cb)

Mark an issue as closed.

id (MsgRef): id of the issue to reopen

reopen: async

issues.reopen(id, cb)`

Mark an issue as open.

id (MsgRef): id of the issue to reopen text (string): text to accompany the open action

edit: async

issues.edit(id, opts, cb)`

Edit an issue.

id (MsgRef): id of the issue to reopen opts.open (boolean): set open/closed status opts.title (string): set title

schemas

var issueSchemas = Issues.schemas

issueSchemas.new(project, title, text)

Create a new issue.

issueSchemas.edit(id, opts)

Edit an issue.

issueSchemas.close(id)

Close an issue.

issueSchemas.reopen(id)

Reopen an issue.

License

Copyright (c) 2016 Charles Lehner

Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

Built with git-ssb-web