git ssb

0+

cel / ssb-pull-requests



Tree: 7a199e01284e415cc909a2ed22b5125de84d5db8

Files: 7a199e01284e415cc909a2ed22b5125de84d5db8 / README.md

3340 bytesRaw

ssb-pull-requests

Pull requests for ssb-git-repos, inheriting from ssb-issues.

API

var Pulls = require('ssb-pull-requests')
var pulls = Pulls.init(sbot)

get: async

Get a pull request by its id

pulls.get(id, cb)

{
  id: Ref,
  created_at: timestamp,
  headRepo: Ref,
  headBranch: string,
  baseRepo: Ref,
  baseBranch: string,
  title: string?,
  text: string?,
  open: boolean,
  mergeable: boolean?
}

getRevs: async

Get the base and head revisions for a pull request. These revs may be used to calculate what changes are in a pull request when the revs of the branches may have changed if the pull request was merged or the upstream diverged.

pulls.get(prId, cb)

{
  head: string,
  base: string
}

list: source

Get a stream of pull requests

issues.list({ repo:, headRepo:, open:, author:, live:, gt:, gte:, lt:, lte:, reverse: })

{
  id: Ref,
  created_at: timestamp,
  repo: Ref,
  branch: string,
  head_repo: Ref,
  head_branch: string,
  title: string?,
  text: string?,
  open: boolean,
  mergeable: boolean?,
}

deinit: async

Deinit pulls. Closes all live streams.

pulls.deinit(cb)

Schemas

var prSchemas = Pulls.schemas

prSchemas.new(baseRepo, baseBranch, headRepo, headBranch[, title], text)

Create a pull request. A pull request is a request to pull from a branch of one git-ssb repo (head), to a branch on another git-ssb repo (base).

{
  type: 'pull-request',
  project: Ref,
  repo: Ref,
  branch: string,
  base_repo: Ref,
  base_branch: string,
  title: string?,
  text: string?
}

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