MCPcopy Create free account
hub / github.com/compozy/agh / Info

Method Info

internal/registry/github/client.go:202–231  ·  view source on GitHub ↗

Info fetches metadata from the latest published release and page one of the releases listing.

(ctx context.Context, slug string)

Source from the content-addressed store, hash-verified

200// Info fetches metadata from the latest published release and page one of the
201// releases listing.
202func (c *Client) Info(ctx context.Context, slug string) (*registry.Detail, error) {
203 repo, err := parseRepoSlug(slug)
204 if err != nil {
205 return nil, err
206 }
207
208 latest, err := c.fetchLatestRelease(ctx, repo)
209 if err != nil {
210 return nil, err
211 }
212 releases, err := c.fetchReleasePage(ctx, repo)
213 if err != nil {
214 return nil, err
215 }
216
217 return &registry.Detail{
218 Listing: registry.Listing{
219 Slug: repo.full,
220 Name: firstNonEmpty(latest.Name, repo.name),
221 Description: releaseDescription(latest),
222 Author: firstNonEmpty(latest.Author.Login, repo.owner),
223 Version: strings.TrimSpace(latest.TagName),
224 Downloads: releaseDownloadCount(latest),
225 Source: c.Name(),
226 },
227 Readme: strings.TrimSpace(latest.Body),
228 Repository: githubRepositoryBaseURL + "/" + repo.full,
229 Versions: releaseVersions(releases),
230 }, nil
231}
232
233// Download fetches the selected release archive stream.
234func (c *Client) Download(

Calls 8

fetchLatestReleaseMethod · 0.95
fetchReleasePageMethod · 0.95
NameMethod · 0.95
parseRepoSlugFunction · 0.85
releaseDescriptionFunction · 0.85
releaseDownloadCountFunction · 0.85
releaseVersionsFunction · 0.85
firstNonEmptyFunction · 0.70