From: Patrick Donnelly Date: Wed, 17 Apr 2024 02:02:35 +0000 (-0400) Subject: script/ptl-tool: add comment to PRs under QA X-Git-Tag: v20.0.0~2136^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56936%2Fhead;p=ceph.git script/ptl-tool: add comment to PRs under QA Signed-off-by: Patrick Donnelly --- 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'