Skip to content

feat: Add enterprise Visual Studio subscription licensing APIs - #4483

Open
hariom-hp wants to merge 1 commit into
google:masterfrom
hariom-hp:feat-vss-licensing
Open

feat: Add enterprise Visual Studio subscription licensing APIs#4483
hariom-hp wants to merge 1 commit into
google:masterfrom
hariom-hp:feat-vss-licensing

Conversation

@hariom-hp

@hariom-hp hariom-hp commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Adds typed EnterpriseService support for GitHub Enterprise Cloud's Visual Studio Subscriptions (VSS) licensing endpoints:

  • ListVisualStudioSubscriptions: GET /enterprises/{enterprise}/visual-studio-subscriptions
  • AddOrUpdateVisualStudioSubscriptionUserMatch: PUT /enterprises/{enterprise}/visual-studio-subscriptions/{visual_studio_subscription_id}
  • DeleteVisualStudioSubscriptionUserMatch: DELETE /enterprises/{enterprise}/visual-studio-subscriptions/{visual_studio_subscription_id}

Changes

  • Defined VisualStudioSubscriptions, VisualStudioSubscriptionAssignment, VisualStudioSubscriptionUserMatchRequest, and ListVisualStudioSubscriptionsOptions.
  • Added the three licensing methods on EnterpriseService with OpenAPI //meta:operation directives and API documentation links.
  • Added unit tests in enterprise_licenses_test.go covering success cases, request body payloads, HTTP 204 responses, bad options, and mock server failures (100% statement coverage).
  • Regenerated accessors in github-accessors.go and iterators in github-iterators.go.

Validation

  • script/fmt.sh
  • script/generate.sh --check
  • script/lint.sh (0 issues across all 12 modules)
  • script/test.sh -race -covermode atomic ./... (0 failures across all 12 modules)
  • go test -v -tags=integration -run=^$ ./test/integration
  • git diff --check

@google-cla

google-cla Bot commented Aug 25, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.52%. Comparing base (30af001) to head (782156e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4483   +/-   ##
=======================================
  Coverage   98.51%   98.52%           
=======================================
  Files         195      195           
  Lines       17691    17735   +44     
=======================================
+ Hits        17429    17473   +44     
  Misses        262      262           

☔ View full report in Codecov by Harness.
📢 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.

@gmlewis gmlewis 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, @hariom-hp!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @Not-Dhananjay-Mishra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants