1

I am running Atlassian stash and I can see the Pull request option on the Web based UI, but I want to know if my users can create Pull requests from their consoles for their working copies without using the stash web UI ?

SQB
  • 3,926
  • 2
  • 28
  • 49
Harry
  • 9
  • 1
  • 3

2 Answers2

1

There are 2 Stash command line tools available:

https://bitbucket.org/atlassian/stash-command-line-tools

https://marketplace.atlassian.com/plugins/org.swift.stash.cli

Note that a pull request requires commits in a branch to be pushed rather than using the local working copy, and this works well in practice.

Rog
  • 4,075
  • 2
  • 24
  • 35
  • thanks for correcting my Snafu with the 'working copy'/ branch. I get it now. I am just getting familiarized with GIT so thanks. – Harry Oct 08 '14 at 17:24
0

I have never done this, but it should be possible using the Stash REST api via some bash script or something to do the POST

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
This API can also be invoked via a user-centric URL when addressing repositories in personal projects. Create a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same {@link Repository#getHierarchyId() hierarchy}.

The authenticated user must have REPO_READ permission for the "from" and "to"repositories to call this resource.

It sounds like quite some work, considering you will need to authenticate and all that, but it might still be worth it for you

Hilikus
  • 9,954
  • 14
  • 65
  • 118