Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

判断gitlab的关键字,不能适合所有的情况,config加入domain进行判断 #1193

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cobra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def target_directory(self, target_mode):
target, branch = self.target, 'master'
else:
logger.critical('Target url exception: {u}'.format(u=self.target))
if 'gitlab' in target:
domain = Config('git', 'domain').value
if domain in target:
username = Config('git', 'username').value
password = Config('git', 'password').value
else:
Expand Down
1 change: 1 addition & 0 deletions config.template
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ password:
[git]
username:
password:
domain:
private_token:
# http://xxx.gitlab.com/api/v3/projects/all
gitlab_url:
Expand Down