Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sure GitHub's secondary rate limit is not reached #207

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

lindell
Copy link
Owner

@lindell lindell commented Oct 28, 2021

}

func (g *Github) modUnlock() {
g.lastModRequest = time.Now()
Copy link
Owner Author

Choose a reason for hiding this comment

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

There are two options on where to put this. Either it's put here, making sure, as there is 1 second in between each request.

The other option is to put it in the lock, which would ensure that we never make more than X requests in X seconds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either option seems sane, giving the one second delay.

This issue has stopped me from rolling out changes across a bulk set of repos.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Let's go with the safe option, since that is what the Github docs states

wait at least one second between each request.

@github-actions
Copy link
Contributor

Included in release v0.36.1 🎉

Sign up for free to 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.

2 participants