-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
149 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# | ||
from bugwarrior.command import pull | ||
from bugwarrior.command import pull, vault | ||
|
||
__all__ = [ | ||
'pull', | ||
'vault', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,13 +70,19 @@ def __init__(self, *args, **kw): | |
password = self.config_get_default('password') | ||
if not password or password.startswith('@oracle:'): | ||
username = self.config_get('username') | ||
service = "bitbucket://%[email protected]/%s" % (login, username) | ||
password = get_service_password( | ||
service, login, oracle=password, | ||
self.get_keyring_service(self.config, self.target), | ||
login, oracle=password, | ||
interactive=self.config.interactive) | ||
|
||
self.auth = (login, password) | ||
|
||
@classmethod | ||
def get_keyring_service(cls, config, section): | ||
login = config.get(section, cls._get_key('login')) | ||
username = config.get(section, cls._get_key('username')) | ||
return "bitbucket://%[email protected]/%s" % (login, username) | ||
|
||
def get_data(self, url): | ||
response = requests.get(self.BASE_API + url, auth=self.auth) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,9 +125,9 @@ def __init__(self, *args, **kw): | |
password = self.config_get_default('password') | ||
if not password or password.startswith('@oracle:'): | ||
username = self.config_get('username') | ||
service = "github://%[email protected]/%s" % (login, username) | ||
password = get_service_password( | ||
service, login, oracle=password, | ||
self.get_keyring_service(self.config, self.target), | ||
login, oracle=password, | ||
interactive=self.config.interactive | ||
) | ||
self.auth = (login, password) | ||
|
@@ -156,6 +156,12 @@ def __init__(self, *args, **kw): | |
'filter_pull_requests', default=False, to_type=asbool | ||
) | ||
|
||
@classmethod | ||
def get_keyring_service(cls, config, section): | ||
login = config.get(section, cls._get_key('login')) | ||
username = config.get(section, cls._get_key('username')) | ||
return "github://%[email protected]/%s" % (login, username) | ||
|
||
def get_service_metadata(self): | ||
return { | ||
'import_labels_as_tags': self.import_labels_as_tags, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters