You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Hey @dsame. You should not see it in the response schema because it exists on the headers, as per the docs here. I have no idea if you have access to the headers through Octokit though.
Given your knowledge of the action, I doubt I'll be able to provide a better solution than yours...!
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:
Activity
dsame commentedon Jun 9, 2023
Hello @IOrlandoni , thank you for you suggestion. I looks very useful and will be implemented asap
thisisnacho commentedon Jun 12, 2023
Hey @dsame, just wanted to confirm if you're working on it. If you are, I wont :)
dsame commentedon Jun 13, 2023
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
thisisnacho commentedon Jun 13, 2023
Hey @dsame. You should not see it in the response schema because it exists on the headers, as per the docs here. I have no idea if you have access to the headers through Octokit though.
Given your knowledge of the action, I doubt I'll be able to provide a better solution than yours...!
dsame commentedon Jun 13, 2023
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:209
thisisnacho commentedon Jun 13, 2023
@dsame LGTM. Can't complain! Thank you!
dsame commentedon Jul 14, 2023
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