kszucs commented on code in PR #13031:
URL: https://github.com/apache/arrow/pull/13031#discussion_r863860306
##########
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:
> ChatNightlyReport is not a subclass of archery.crossbow.reports.Report but
of archery.utils.report.JinjaReport which is of archery.utils.report.Report (we
have two Report classes).
Indeed, it makes sense now.
> My idea was to refactor on another ticket the existing EmailReport to be
also a JinjaReport and make archery.crossbow.reports.Report
That sounds great!
> I did not wanted to refactor further as part of this ticket as the email
reports are not tested but let me know if you would prefer this to be done as
part of the ticket and I can try and add tests for that too.
I don't have a strong preference here, we can merge it as is.
--
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]