Skip to content

Bitbucket API (2.0) wrapper for pull request management

Notifications You must be signed in to change notification settings

kyriediculous/bitbucket-pr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitbucket Pull Request

Module

const bpr = require('bitbucket-pr')
import bpr from 'bitbucket-pr'

Create

 let result = await bpr.create(
   'mybitbucketusername/myrepository', // repository
    'My first PR', // title
    'This is my first pull request', // description
    'test_branch', // source branch
    'master', // destination branch
    {
      user: 'mybitbucketusername',
      password: 'mybitbucketpassword'
    }
  )

Get

 let result = await bpr.get(
   'mybitbucketusername/myrepository', // repository
   '1', //pullrequest ID , optional !
   {
     user: 'mybitbucketusername',
     password: 'mybitbucketpassword'
   }
  )

Approve

  result = await bpr.approve(
    'mybitbucketusername/myrepository', // repository
    '1', // PR id
    {
      user: 'mybitbucketusername',
      password: 'mybitbucketpassword'
    }
  )

Decline

  result = await bpr.decline(
    'mybitbucketusername/myrepository', // repository
    '1', // PR id
    {
      user: 'mybitbucketusername',
      password: 'mybitbucketpassword'
    }
  )

getRepo

  result = await bpr.getRepo(
    'mybitbucketusername/myrepository', // repository
    {
      user: 'mybitbucketusername',
      password: 'mybitbucketpassword'
    }
  )

getUser

  result = await bpr.getUser(
    {
      user: 'mybitbucketusername',
      password: 'mybitbucketpassword'
    }
  )
  //Returns user details , team permissions and repository permissions 

About

Bitbucket API (2.0) wrapper for pull request management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published