Skip to content

Commit

Permalink
馃敟 remote detection
Browse files Browse the repository at this point in the history
Signed-off-by: Guyzmo <[email protected]>
  • Loading branch information
guyzmo committed May 17, 2017
1 parent 70732ff commit 6bf06d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git_repo/services/ext/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def request_create(self, onto_user, onto_repo, from_branch, onto_branch, title=N
try:
onto_project = self.get_repository(onto_user, onto_repo)

from_reposlug = self.guess_repo_slug(self.repository, self)
from_reposlug = self.guess_repo_slug(self.repository, self, resolve_targets=['{service}'])
if from_reposlug:
from_user, from_repo = from_reposlug.split('/')
if (onto_user, onto_repo) == (from_user, from_repo):
Expand Down
4 changes: 2 additions & 2 deletions git_repo/services/ext/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def request_create(self, onto_user, onto_repo, from_branch, onto_branch, title=N
if not onto_project:
raise ResourceNotFoundError('Could not find project `{}/{}`!'.format(onto_user, onto_repo))

from_reposlug = self.guess_repo_slug(self.repository, self)
from_reposlug = self.guess_repo_slug(self.repository, self, resolve_targets=['{service}'])
if from_reposlug:
from_user, from_repo = from_reposlug.split('/')
if (onto_user, onto_repo) == (from_user, from_repo):
Expand Down Expand Up @@ -287,7 +287,7 @@ def request_create(self, onto_user, onto_repo, from_branch, onto_branch, title=N
if not onto_branch:
onto_branch = self.get_project_default_branch(onto_project)

onto_target = '{}/{}:{}'.format(onto_user, onto_project.name, onto_branch)
onto_target = '{}:{}'.format(onto_user, onto_project.path_with_namespace, onto_branch)

# translate from gitlab username to git remote name
if not title and not description and edit:
Expand Down

0 comments on commit 6bf06d6

Please sign in to comment.