PingCAP-QE / ci

Continue intergration tests
Apache License 2.0
19 stars 96 forks source link

fix(scripts): fix update-prow-owners.ts #2972

Closed wuhuizuo closed 1 month ago

wuhuizuo commented 1 month ago

skip the repository when the bot has no rights to create refs.

Signed-off-by: wuhuizuo wuhuizuo@126.com

ti-chi-bot[bot] commented 1 month ago

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

Based on the pull request title and description, it seems that the changes are related to fixing an error in the update-prow-owners.ts script. The change involves adding a catch block to handle an error that may occur when the bot does not have rights to create refs. The catch block logs a warning message and continues to the next repository.

One potential problem with this change is that it may hide potential issues with the bot's permissions. If the bot does not have the necessary permissions to create refs, it may indicate a misconfiguration or an issue with the bot's access token. It is recommended to investigate the root cause of the permission issue and fix it rather than skipping the repository.

A possible suggestion to fix this issue is to add a check for the bot's permission to create refs before attempting to update the repository. If the bot does not have the necessary permission, the script can log an error message and skip the repository. This will ensure that potential issues with the bot's permissions are not hidden and can be addressed.

wuhuizuo commented 1 month ago

/approve

ti-chi-bot[bot] commented 1 month ago

[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: - ~~[OWNERS](https://github.com/PingCAP-QE/ci/blob/main/OWNERS)~~ [wuhuizuo] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment