Skip to content

Conversation

@luna-veil-8080
Copy link
Contributor

Description

Resolves #40

Type of Change

Please delete options that are not relevant.

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this change manually

Documentation

  • I have updated the documentation accordingly
  • I have updated the CHANGELOG.md file
  • I have added/updated code comments where necessary

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings
  • My changes are compatible with the supported Go versions (1.21+)

Screenshots (if applicable)

If your changes include visual elements, please add screenshots here.

Related Issues

Closes #(issue number)

Additional Notes

Add any other context about the pull request here.

Copy link
Owner

@jferrl jferrl left a comment

Choose a reason for hiding this comment

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

Please, review comments. 😃

github_test.go Outdated
wantErr bool
name string
baseURL string
expectedBaseURL interface{}
Copy link
Owner

Choose a reason for hiding this comment

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

Prefer keeping the original wantErr bool + a separate expectedURL string field instead of using interface{} to represent both. This is more idiomatic Go and gives type safety at compile time.

github_test.go Outdated
t.Errorf("withEnterpriseURL() error = %v, wantErr %v", err, tt.wantErr)
githubClient, err := client.withEnterpriseURL(tt.baseURL)

if err != nil {
Copy link
Owner

Choose a reason for hiding this comment

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

This silently passes when an error occurs and expectedBaseURL is nil, but doesn't assert that an error was expected. The original if (err != nil) != tt.wantErr pattern is stricter — it catches both unexpected errors and missing expected errors.

@luna-veil-8080 luna-veil-8080 requested a review from jferrl February 8, 2026 23:19
Copy link
Owner

@jferrl jferrl left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.50%. Comparing base (c454a71) to head (7b20ea4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   92.20%   92.50%   +0.29%     
==========================================
  Files           3        3              
  Lines         154      160       +6     
==========================================
+ Hits          142      148       +6     
  Misses          7        7              
  Partials        5        5              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jferrl jferrl merged commit d759cc4 into jferrl:main Feb 9, 2026
8 checks passed
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.

[Bug]: Wrong url for github enterprise since go-github dependency was removed

2 participants