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

Method IsStarred

github/activity_star.go:111–121  ·  view source on GitHub ↗

IsStarred checks if a repository is starred by authenticated user. GitHub API docs: https://docs.github.com/rest/activity/starring?apiVersion=2022-11-28#check-if-a-repository-is-starred-by-the-authenticated-user meta:operation GET /user/starred/{owner}/{repo}

(ctx context.Context, owner, repo string)

Source from the content-addressed store, hash-verified

109//
110//meta:operation GET /user/starred/{owner}/{repo}
111func (s *ActivityService) IsStarred(ctx context.Context, owner, repo string) (bool, *Response, error) {
112 u := fmt.Sprintf("user/starred/%v/%v", owner, repo)
113 req, err := s.client.NewRequest(ctx, "GET", u, nil)
114 if err != nil {
115 return false, nil, err
116 }
117
118 resp, err := s.client.Do(req, nil)
119 starred, err := parseBoolResponse(err)
120 return starred, resp, err
121}
122
123// Star a repository as the authenticated user.
124//

Callers

nothing calls this directly

Calls 3

parseBoolResponseFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45

Tested by

no test coverage detected