I'd like to create a bash script that creates a pull request for the repo I'm in.
I can determine the ssh url using `git remote -v`
this give me ssh://git@gitserver:7999/myproject/myrepo.git
I need the https url, project & repo-slug for the pull request api call.
Is there a way to get this info from my repo
As far as I can tell there is no documented way to determine this.
I decided to add some properties to the git config
git config --global bitbucket.server.sshurl 'ssh://git@gitserver:7999'
git config --global bitbucket.server.apiurl 'https://gitserver/rest/api/1.0'
git config --local bitbucket.repo.project myproject
git config --local bitbucket.repo.slug myrepo
sshurl can probably be used to get project and slug from the remote url
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.