MCPcopy Index your code
hub / github.com/google/go-github / Stop

Method Stop

github/codespaces.go:324–338  ·  view source on GitHub ↗

Stop stops a codespace. You must authenticate using an access token with the codespace scope to use this endpoint. GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint. GitHub API docs: https://docs.github.com/rest/codespaces/codespaces?ap

(ctx context.Context, codespaceName string)

Source from the content-addressed store, hash-verified

322//
323//meta:operation POST /user/codespaces/{codespace_name}/stop
324func (s *CodespacesService) Stop(ctx context.Context, codespaceName string) (*Codespace, *Response, error) {
325 u := fmt.Sprintf("user/codespaces/%v/stop", codespaceName)
326 req, err := s.client.NewRequest(ctx, "POST", u, nil)
327 if err != nil {
328 return nil, nil, err
329 }
330
331 var codespace *Codespace
332 resp, err := s.client.Do(req, &codespace)
333 if err != nil {
334 return nil, resp, err
335 }
336
337 return codespace, resp, nil
338}
339
340// Delete deletes a codespace.
341//

Callers 2

Calls 2

NewRequestMethod · 0.80
DoMethod · 0.45

Tested by 1