Skip to content

fix: Correct body in EnterpriseService.InitialConfig - #3763

Merged
gmlewis merged 1 commit into
google:masterfrom
alexandear-org:fix/enterprise-initial-config
Oct 7, 2025
Merged

fix: Correct body in EnterpriseService.InitialConfig#3763
gmlewis merged 1 commit into
google:masterfrom
alexandear-org:fix/enterprise-initial-config

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

This PR fixes the body in the EnterpriseService.InitialConfig endpoint. From the documentation:

image

Before the PR, the request body is:

{"License":"1234-1234","Password":"password"}

After:

{"license":"1234-1234","password":"password"}

The bug was found with the help of musttag linter:

$ ./script/lint.shlinting .github/enterprise_manage_ghes_config_test.go:607:52: the given struct should be annotated with the `json` tag (musttag) assertNilError(t, json.NewDecoder(r.Body).Decode(v)) ^github/timestamp_test.go:132:28: the given struct should be annotated with the `json` tag (musttag) out, err := json.Marshal(tc.data) ^github/timestamp_test.go:199:30: the given struct should be annotated with the `json` tag (musttag) bytes, err := json.Marshal(tc.data) ^3 issues:* musttag: 3

So, the PR enables it as well.

@codecov

codecovBot commented Oct 7, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.34%. Comparing base (68b82b5) to head (84ee81d).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3763 +/- ##
=======================================
Coverage 91.34% 91.34% =======================================
Files 187 187 Lines 16702 16702 =======================================
Hits 15257 15257 Misses 1257 1257 Partials 188 188 

☔ 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.

@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, @alexandear!
LGTM.
Merging.

@gmlewis
gmlewis merged commit 52f9fff into google:masterOct 7, 2025
7 checks passed
@alexandear
alexandear deleted the fix/enterprise-initial-config branch October 7, 2025 16:11
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.

2 participants

@alexandear@gmlewis