kszucs commented on code in PR #13031:
URL: https://github.com/apache/arrow/pull/13031#discussion_r863698975


##########
dev/archery/archery/crossbow/cli.py:
##########
@@ -302,6 +303,33 @@ def report(obj, job_name, sender_name, sender_email, 
recipient_email,
         report.show(output)
 
 
[email protected]()
[email protected]('job-name', required=True)
[email protected]('--send/--dry-run', default=False,
+              help='Just display the report, don\'t send it')
[email protected]('--webhook', '-w',
+              help='Zulip/Slack Webhook address to send the report to')
[email protected]('--fetch/--no-fetch', default=True,
+              help='Fetch references (branches and tags) from the remote')
[email protected]_obj
+def report_chat(obj, job_name, send, webhook, fetch):
+    """
+    Send a chat report to a webhook showing success/failure
+    of tasks in a Crossbow run.
+    """
+    output = obj['output']
+    queue = obj['queue']
+    if fetch:
+        queue.fetch()
+
+    job = queue.get(job_name)
+    report_chat = ChatNightlyReport(report=Report(job))

Review Comment:
   Why do you need to pass a report instance to another report subclass? Could 
we use `ChatNightlyReport(job=job)` instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to