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

Allow using the public github api #12

Merged
merged 1 commit into from May 8, 2024

Conversation

ClashTheBunny
Copy link
Contributor

Two changes are needed:

  • rate limit such that github doesn't ratelimit heckler
  • allow passing an empty "github_domain" to the config to use the public API endpoints

Two changes are needed:
 * rate limit such that github doesn't ratelimit heckler
 * allow passing an empty "github_domain" to the config to use the
   public API endpoints
@@ -2735,7 +2741,14 @@ func fetchRepo(conf *HecklerdConf) (*git.Repository, error) {
Url: conf.GitHubHttpProxy,
}
}
remoteUrl := fmt.Sprintf("https://x-access-token:%s@%s/%s/%s", tok, conf.GitHubDomain, conf.RepoOwner, conf.Repo)
Copy link
Contributor

Choose a reason for hiding this comment

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

May be we Could we move this "empty" check to main function. There is logic to setup default values and checking if values are empty or not. [We can keep all config default/empty check logics at one place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this felt gross to me too. That's a great suggestion!

Copy link
Member

@ssgelm ssgelm left a comment

Choose a reason for hiding this comment

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

Looks great thanks!

@ssgelm ssgelm merged commit 3a02e39 into braintree:main May 8, 2024
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.

None yet

3 participants