Skip to content

Conversation

@Not-Dhananjay-Mishra
Copy link
Contributor

Relates: #2362
This PR adds support for remaining endpoint of Codespaces

  • GET /repos/{owner}/{repo}/codespaces/devcontainers
  • GET /repos/{owner}/{repo}/codespaces/new
  • GET /repos/{owner}/{repo}/codespaces/permissions_check
  • POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces
  • POST /user/codespaces
  • GET /user/codespaces/{codespace_name}
  • PATCH /user/codespaces/{codespace_name}
  • POST /user/codespaces/{codespace_name}/exports
  • GET /user/codespaces/{codespace_name}/exports/{export_id}
  • POST /user/codespaces/{codespace_name}/publish

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.54%. Comparing base (8ca48dd) to head (5859f8c).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3886      +/-   ##
==========================================
+ Coverage   92.48%   92.54%   +0.05%     
==========================================
  Files         200      200              
  Lines       14564    14679     +115     
==========================================
+ Hits        13469    13584     +115     
  Misses        895      895              
  Partials      200      200              

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

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @Not-Dhananjay-Mishra!

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Dec 17, 2025
@Not-Dhananjay-Mishra
Copy link
Contributor Author

@gmlewis, Thanks for the suggestions! Fixed 👍

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @Not-Dhananjay-Mishra!
One minor tweak, please, then I think we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29

Copy link
Contributor

@alexandear alexandear left a comment

Choose a reason for hiding this comment

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

Left some suggestions. Feel free to ask questions.

// GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#update-a-codespace-for-the-authenticated-user
//
//meta:operation PATCH /user/codespaces/{codespace_name}
func (s *CodespacesService) Update(ctx context.Context, codespaceName string, opt *UpdateCodespaceOptions) (*Codespace, *Response, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (s *CodespacesService) Update(ctx context.Context, codespaceName string, opt *UpdateCodespaceOptions) (*Codespace, *Response, error) {
func (s *CodespacesService) UpdateCodespace(ctx context.Context, codespaceName string, opts *UpdateCodespaceOptions) (*Codespace, *Response, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see many method in codespace.go where method name are like Delete, Stop, Start and List. So can't we use Update only here?

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.

3 participants