Commit b7627eaf authored by Timo Koch's avatar Timo Koch
Browse files

[ci][cleanup] Reduce api suffix functions

parent 374bbedc
......@@ -23,10 +23,14 @@ class APIRequester:
return json.loads(data)
def pipelinesApiSuffix(): return 'pipelines/'
def pipelineApiSuffix(id): return 'pipelines/' + str(id) + '/'
def commitsApiSuffix(): return 'repository/commits/'
def commitApiSuffix(sha): return 'repository/commits/' + sha + '/'
# if no id is given this returns all pipelines (// is fine)
def pipelineApiSuffix(id=''):
return 'pipelines/' + str(id) + '/'
# if no commit sha is given this returns all commits (// is fine)
def commitApiSuffix(sha=''):
return 'repository/commits/' + str(sha) + '/'
parser = ArgumentParser(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment