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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.