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

Improve GitHub debug logging #784

Merged
merged 5 commits into from
Sep 8, 2022

Conversation

dustin-decker
Copy link
Contributor

  • Increases debug logging for github
  • Frees resources sooner

@dustin-decker dustin-decker requested review from a team as code owners September 8, 2022 01:04
@dustin-decker dustin-decker changed the title OC-94-increase-logging-free-resources Improve GitHub debug logging Sep 8, 2022
@dustin-decker
Copy link
Contributor Author

Let's merge #783 first

pkg/sources/github/github.go Outdated Show resolved Hide resolved
if err == nil {
defer res.Body.Close()
}
res.Body.Close()
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

pkg/sources/github/github.go Outdated Show resolved Hide resolved
pkg/sources/github/github.go Outdated Show resolved Hide resolved
for _, gist := range gists {
gistURLs = append(gistURLs, gist.GetGitPullURL())
}
if resp == nil || resp.NextPage == 0 {
if res == nil || res.NextPage == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

linter: pointing out the pointer can be nil 👀

pkg/sources/github/github.go Outdated Show resolved Hide resolved
pkg/sources/github/github.go Outdated Show resolved Hide resolved
pkg/sources/github/github.go Outdated Show resolved Hide resolved
pkg/sources/github/github.go Outdated Show resolved Hide resolved
pkg/sources/github/github.go Outdated Show resolved Hide resolved
@ahrav
Copy link
Collaborator

ahrav commented Sep 8, 2022

Let's merge #783 first

This should be in.

@dustin-decker dustin-decker merged commit 80b2472 into main Sep 8, 2022
@dustin-decker dustin-decker deleted the OC-94-increase-logging-free-resources branch September 8, 2022 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants