Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tiup-publisher): add notify when publish failed #178

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

wuhuizuo
Copy link
Contributor

Signed-off-by: wuhuizuo [email protected]

@ti-chi-bot ti-chi-bot bot requested a review from purelind October 11, 2024 03:36
Copy link

ti-chi-bot bot commented Oct 11, 2024

I have already done a preliminary review for you, and I hope to help you do a better job.

This pull request adds a feature to send notifications when publishing to the mirror fails. It also adds a new parameter larkWebhookURL to the Config struct which is used to specify the Lark Webhook URL to send notifications.

Overall, the changes look good, but there are a few things to consider:

  1. The pull request lacks sufficient description. The description should provide more context about the changes made and why they are necessary.

  2. The NewHandler function has been modified to accept a logger. However, the logger is not used consistently throughout the code. Specifically, log is used in some places instead of h.logger.

  3. The notifyLark function should handle errors returned by HTTP requests. Currently, it doesn't handle any errors that might occur during the request.

To fix these issues:

  1. Ask the author to add more details to the PR description.

  2. Suggest the author to replace log with h.logger wherever necessary.

  3. Suggest the author to add error handling to the notifyLark function.

@wuhuizuo wuhuizuo changed the title feat(tiup-publisher): add notify when publish failed. feat(tiup-publisher): add notify when publish failed Oct 11, 2024
@ti-chi-bot ti-chi-bot bot added the size/L label Oct 11, 2024
@wuhuizuo
Copy link
Contributor Author

/approve

Copy link

ti-chi-bot bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Oct 11, 2024
@ti-chi-bot ti-chi-bot bot merged commit c1947d9 into main Oct 11, 2024
3 checks passed
@ti-chi-bot ti-chi-bot bot deleted the feature/notify-when-publish-failed branch October 11, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant