// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. package tangled // schema: sh.tangled.git.temp2.getCommitStats import ( "context" "github.com/bluesky-social/indigo/lex/util" ) const ( GitTemp2GetCommitStatsNSID = "sh.tangled.git.temp2.getCommitStats" ) // GitTemp2GetCommitStats_Commit is a "commit" in the sh.tangled.git.temp2.getCommitStats schema. type GitTemp2GetCommitStats_Commit struct { Sha string `json:"sha" cborgen:"sha"` Subject string `json:"subject" cborgen:"subject"` } // GitTemp2GetCommitStats_Month is a "month" in the sh.tangled.git.temp2.getCommitStats schema. type GitTemp2GetCommitStats_Month struct { // commits: Commits attributed to the actor during this month. Commits int64 `json:"commits" cborgen:"commits"` // repoCount: Repos the actor committed to during this month. RepoCount int64 `json:"repoCount" cborgen:"repoCount"` // repos: The ten repos the actor committed to most this month, busiest first. Repos []*GitTemp2GetCommitStats_RepoCommits `json:"repos" cborgen:"repos"` // start: Start of this UTC calendar month. Start string `json:"start" cborgen:"start"` } // GitTemp2GetCommitStats_Output is the output of a sh.tangled.git.temp2.getCommitStats call. type GitTemp2GetCommitStats_Output struct { Months []*GitTemp2GetCommitStats_Month `json:"months" cborgen:"months"` } // GitTemp2GetCommitStats_RepoCommits is a "repoCommits" in the sh.tangled.git.temp2.getCommitStats schema. type GitTemp2GetCommitStats_RepoCommits struct { Commits int64 `json:"commits" cborgen:"commits"` // recent: Most recent commits in this repo during the month. Recent []*GitTemp2GetCommitStats_Commit `json:"recent" cborgen:"recent"` // repo: DID of the repo the commits were first seen in. Repo string `json:"repo" cborgen:"repo"` } // GitTemp2GetCommitStats calls the XRPC method "sh.tangled.git.temp2.getCommitStats". // // actor: Actor whose commits to count. func GitTemp2GetCommitStats(ctx context.Context, c util.LexClient, actor string, months int64) (*GitTemp2GetCommitStats_Output, error) { var out GitTemp2GetCommitStats_Output params := map[string]interface{}{} params["actor"] = actor if months != 0 { params["months"] = months } if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp2.getCommitStats", params, nil, &out); err != nil { return nil, err } return &out, nil }