From b25012fab7b01ff3eb37f054ec2c0d7ab72611bf Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 16 Apr 2024 22:02:35 -0400 Subject: [PATCH] script/ptl-tool: add comment to PRs under QA Signed-off-by: Patrick Donnelly --- src/script/ptl-tool.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py index 505082305ff89..1d3778f9ad4c3 100755 --- a/src/script/ptl-tool.py +++ b/src/script/ptl-tool.py @@ -494,6 +494,14 @@ def build_branch(args): issue = R.issue.create(**issue_kwargs) log.info("created redmine qa issue: %s", issue.url) + + for pr in prs: + log.debug(f"Posting QA Run in comment for ={pr}") + endpoint = f"https://api.github.com/repos/{BASE_PROJECT}/{BASE_REPO}/issues/{pr}/comments" + body = f"This PR is under test in [{issue.url}]({issue.url})." + r = session.post(endpoint, auth=gitauth(), data=json.dumps({'body':body})) + log.debug(f"= {r}") + def main(): parser = argparse.ArgumentParser(description="Ceph PTL tool") default_base = 'main' -- 2.39.5