ITADN

chore: Log GitHub API rate limit

#65Pull Requestz-Fng 创建于 2025-10-31
Z
z-Fngcommented
### Motivation and Context The Excavator for the Main and Extras buckets has frequently hit the GitHub API rate limit in recent months. This PR adds logs at the beginning and end of each action to better trace GitHub API usage. - https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28 - https://docs.github.com/en/rest/rate-limit/rate-limit?apiVersion=2022-11-28 > You can also call the GET /rate_limit endpoint to check your rate limit. Calling this endpoint does not count against your primary rate limit, but it can count against your secondary rate limit. ### Related Issues - https://github.com/ScoopInstaller/GithubActions/issues/64 - https://github.com/ScoopInstaller/Scoop/issues/6461 ### Test Cases - https://github.com/z-Fng/Scoop-Extras/actions/runs/19242318703/job/55007762826 > GITHUB API RATE LIMIT: {"limit":5000,"used":0,"remaining":5000,"reset":1761957214} > GITHUB API RATE LIMIT: {"limit":5000,"used":1248,"remaining":3752,"reset":1761957217} <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a function to query and retrieve current GitHub API rate limit information, with an option to return core limits. * **Chores** * Added logging of API rate limit metrics at the start and end of key action execution points to improve monitoring and visibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
合并状态:未合并 5 条评论