Repository navigation
Expose rate limits on the logs #1029
Description
Activity
- addedfeature requestNew feature or request to improve the current logicNew feature or request to improve the current logic
on Jun 8, 2023 Hello @IOrlandoni , thank you for you suggestion. I looks very useful and will be implemented asap
Hey @dsame, just wanted to confirm if you're working on it. If you are, I wont :)
Hi @IOrlandoni , i am already close to providing the solution, but i'd like to see you approach because this statement "The information should already be included in the headers of the responses from Github" is not clear for me. According to the docs the response does not include api usage info: see response schema
Hi @IOrlandoni,
Ok, i preferred to follow the common pattern and call the rate limit API directly in this PR
Please take a look at the sample build output to make sure it is that you expected:debug status before the processing: https://github.com/akv-demo/test-stale/actions/runs/5257429320/jobs/9500195867#step:2:40
debug status after the processing: https://github.com/akv-demo/test-stale/actions/runs/5257429320/jobs/9500195867#step:2:208
and summary of the usage logged on info level:
https://github.com/akv-demo/test-stale/actions/runs/5257429320/jobs/9500195867#step:2:209Reacted by AbsolytnaiaLoveReacted by Nacho Orlandoni@dsame LGTM. Can't complain! Thank you!
Hello @IOrlandoni , the related PR is merged and will be available in the next release.
Meanwhile you can test and review the change by switching to the main branch
- uses: actions/stale@main
Description:
It would be nice to get an idea of the rate limit information before or after the run, to understand the context on which the action is running. The information should already be included in the headers of the responses from Github, it's just a matter of displaying it.
Justification:
Understanding if we can raise the operations per run, if we're close to hitting the rate limit, etc.
Are you willing to submit a PR?
Happy to, if someone confirms this is a good thing for the action.