stash-api
[limited] REST Client for Atlassian Stash
Install
npm install stash-api --save
Usage
Use the module to create a pull request:
var stashApiModule =StashApi = stashApiModuleStashApiPullRequest = stashApiModulemodelsPullRequeststash = 'http' 'localhost' '7990' 'username' 'password';// create a PRpr = ;prtitle = 'Some Pull Request Title';prdescription = 'description';// reviewers for the PRprreviewers =user:name: 'reviewer1'user:name: 'reviewer2';// what is the branch we are coming from?prfromRef =id: 'refs/heads/branch1'repository:slug: 'repo1'project:key: 'PROJ';// what is the branch we are requesting a pull request to?prtoRef =id: 'refs/heads/master'repository:slug: 'repo1'project:key: 'PROJ';// make the actual requeststash;
Notes
- Only a small subset of the currently supported commands are implemented because I only needed it for (a Stash CLI I am working on)[https://github.com/ingshtrom/stash-creview].
- no tests were done. This client is supposed to do next to nothing other than query Stash and return a promise to the client.