Skip to content

Add audit log rate limit category and make rate limit category getter public - #3088

Merged
gmlewis merged 3 commits into
google:masterfrom
Letiste:leo.sale/rate-limit-resources
Mar 20, 2024
Merged

Add audit log rate limit category and make rate limit category getter public#3088
gmlewis merged 3 commits into
google:masterfrom
Letiste:leo.sale/rate-limit-resources

Conversation

@Letiste

@LetisteLetiste commented Mar 1, 2024

Copy link
Copy Markdown
Contributor

When calling https://api.github.com/rate_limit, the endpoint returns a audit_log rate limit category as well. This is used for /audit-log endpoints:

This PR adds this new rate limit category.

I have a use case where I need to know the rate limit category before making the request so as to not reimplement what's already done in go-github, I made this logic public. Other users could also benefit of this change.
If you think it's not reasonable and it should be kept private, I will revert this change.

@codecov

codecovBot commented Mar 1, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.87%. Comparing base (2b8c7fa) to head (c483b01).
Report is 23 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3088 +/- ##
==========================================
- Coverage 97.72% 92.87% -4.86% 
==========================================
Files 153 170 +17 Lines 13390 11404 -1986 ==========================================
- Hits 13085 10591 -2494 - Misses 215 723 +508 
Partials 90 90 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LetisteLetiste closed this Mar 1, 2024
@LetisteLetiste reopened this Mar 1, 2024
@Letiste
Letiste marked this pull request as ready for review March 1, 2024 15:45
@Letiste

Copy link
Copy Markdown
ContributorAuthor

@gmlewis could you take a look at this when you have some time? 🙏 (I'm notifying you as you seem to review the recent PRs, sorry if you are not the correct person for that).
Let me know if I need to clarify some things.
Not sure as well why the codecov is failing here, I thought I added all the necessary tests related to my changes but maybe I missed some

@gmlewis

Copy link
Copy Markdown
Collaborator

@gmlewis could you take a look at this when you have some time? 🙏 (I'm notifying you as you seem to review the recent PRs, sorry if you are not the correct person for that). Let me know if I need to clarify some things. Not sure as well why the codecov is failing here, I thought I added all the necessary tests related to my changes but maybe I missed some

Hi @Letiste - I apologize for not seeing this two weeks ago. I'm not sure how I missed it. 😞

Don't worry about the codecov - it has lately been really flakey.

I'll take a look at the PR.

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Letiste !
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@gmlewisgmlewis added the NeedsReview PR is awaiting a review before merging. label Mar 18, 2024
@gmlewisgmlewis removed the NeedsReview PR is awaiting a review before merging. label Mar 20, 2024
@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you, @rpelliard !
Merging.

@gmlewis
gmlewis merged commit dbf91ee into google:masterMar 20, 2024
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Letiste@gmlewis@rpelliard