Skip to content

Commit

Permalink
add url and token parameters
Browse files Browse the repository at this point in the history
Signed-off-by: kimpaller <[email protected]>
  • Loading branch information
kimpaller committed Apr 22, 2024
1 parent 3698fef commit 7075785
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions telemetry/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def log_boot_logs(server, in_args):
@click.option("--job_name", required=True, help="Jenkisn job name to fetch")
@click.option("--build_number", required=True, help="Build no to fetch")
@click.option("--board_name", default=None, help="Board to fetch, will select all if empty")
def create_results_gist(server, job_name, build_number, board_name):
@click.option("--github_gist_url", default=None, help="Base URL to the gist repository")
@click.option("--github_gist_token", default=None, help="Token required for gist access")
def create_results_gist(server, job_name, build_number, board_name, github_gist_url, github_gist_token):
tel = telemetry.searches(server=server)
boot_test = tel.boot_tests(
boot_folder_name=board_name,
Expand Down Expand Up @@ -236,7 +238,7 @@ def create_results_gist(server, job_name, build_number, board_name):
data[bn] = info[0]

m = telemetry.markdown.ResultsMarkdown(data)
m.generate_gist()
m.generate_gist(github_gist_url, github_gist_token)

@click.command()
def main(args=None):
Expand Down
4 changes: 2 additions & 2 deletions telemetry/report/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def generate_param(self,data):
}
return param_dict

def generate_gist(self):
def generate_gist(self, url, token):
for bn,param in self.param_dict.items():
outfile = self.generate(param, bn+".md")
gist = telemetry.gist.Gist()
gist = telemetry.gist.Gist(url, token)
gist_link = gist.create_gist(outfile, f'''Boardname: {param["board_name"]}\n
Branch: {param["branch"]}\nPR ID: {param["pr_id"]}\n
timestamp: {param["timestamp"]}''')
Expand Down

0 comments on commit 7075785

Please sign in to comment.