gitlab: refined enterprise gitlab support
This commit is contained in:
parent
63c36dccd2
commit
ece9244966
3 changed files with 11 additions and 7 deletions
|
@ -18,10 +18,12 @@ class BlockBridgeGitlabAutomation(BlockBridgeReachabilityAutomation):
|
|||
if "GITLAB_URL" in current_app.config:
|
||||
credentials['url'] = current_app.config['GITLAB_URL']
|
||||
gitlab = Gitlab(**credentials)
|
||||
project = gitlab.project.get(current_app.config['GITLAB_BRIDGE_PROJECT'])
|
||||
project = gitlab.projects.get(current_app.config['GITLAB_BRIDGE_PROJECT'])
|
||||
for vantage_point in current_app.config['GITHUB_BRIDGE_VANTAGE_POINTS']:
|
||||
contents = project.get(
|
||||
filepath=f"recentResult_{vantage_point}",
|
||||
contents = project.files.get(
|
||||
file_path=f"recentResult_{vantage_point}",
|
||||
ref=current_app.config["GITLAB_BRIDGE_BRANCH"]
|
||||
)
|
||||
self._lines = contents.decode().splitlines()
|
||||
# Decode the base64 first, then decode the UTF-8 string
|
||||
self._lines = contents.decode().decode('utf-8').splitlines()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue