Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
- Variables
- func GetFirstResponseTime[C IssueOrPullRequest](contrib C, endDateTime githubv4.DateTime, fromTeamOnly bool, teamIds []string) time.Duration
- func GetLatestResponseTime[C IssueOrPullRequest](contrib C, endDateTime githubv4.DateTime, fromTeamOnly bool, teamIds []string) time.Duration
- func IsClosed[C IssueOrPullRequest](contrib C) bool
- type Issue
- type IssueOrPullRequest
- type IssueSearchEdges
- type PrSearchEdges
- type PullRequest
Constants ¶
This section is empty.
Variables ¶
var ( // RestrictToTeam is used in several subcommands to restrict the comments included // as feedback to only those that are made by immediate team members RestrictToTeam bool IssuesCmd = &cobra.Command{ Use: "issues", Short: "Gather issue-related data", Long: "The subcommand used as the root for all queries for issue-related data", } )
rootCmd represents the base command when called without any subcommands
var FirstIssueSearchQuery struct { Search struct { // contains filtered or unexported fields } `graphql:"search(first: $first, query: $query, type: $type)"` }
* define a pair of structs that can be used to query GitHub for a list of all of the * open PRs in a given organization (by name) that match a given query; the first is * used to query for the first page of results and the second is used to query for * subsequent pages of results
var FirstPrSearchQuery struct { Search struct { // contains filtered or unexported fields } `graphql:"search(first: $first, query: $query, type: $type)"` }
* define a pair of structs that can be used to query GitHub for a list of all of the * open PRs in a given organization (by name) that match a given query; the first is * used to query for the first page of results and the second is used to query for * subsequent pages of results
var IssueSearchQuery struct { Search struct { // contains filtered or unexported fields } `graphql:"search(first: $first, after: $after, query: $query, type: $type)"` }
var PrSearchQuery struct { Search struct { // contains filtered or unexported fields } `graphql:"search(first: $first, after: $after, query: $query, type: $type)"` }
var (
PullsCmd = &cobra.Command{
Use: "pulls",
Short: "Gather PR-related data",
Long: "The subcommand used as the root for all queries for PR-related data",
}
)
rootCmd represents the base command when called without any subcommands
Functions ¶
func GetFirstResponseTime ¶
func GetFirstResponseTime[C IssueOrPullRequest](contrib C, endDateTime githubv4.DateTime, fromTeamOnly bool, teamIds []string) time.Duration
* Define a generic function that we can use to get the time of the first response to an issue * or pull request. The arguments to this function are as follows: * * - contrib: the issue or pull request for which we want to get the time of the first response * - endDateTime: the end date/time of the query window; this is used to determine the default * time to first response if no response is found * - fromTeamOnly: a boolean flag that indicates whether or not we should only count comments * from immediate team members * - teamIds: a slice of strings that contains the GitHub IDs of the members of the team that * owns the repository that contains the issue or pull request for which we want to get * the time of the first response *
func GetLatestResponseTime ¶
func GetLatestResponseTime[C IssueOrPullRequest](contrib C, endDateTime githubv4.DateTime, fromTeamOnly bool, teamIds []string) time.Duration
* Define a generic function that we can use to get the time of the latest response (or staleness) * to an issue or pull request. The arguments to this function are as follows: * * - contrib: the issue or pull request for which we want to get the time of the first response * - endDateTime: the end date/time of the query window; this is used to determine the default * time to first response if no response is found * - fromTeamOnly: a boolean flag that indicates whether or not we should only count comments * from immediate team members * - teamIds: a slice of strings that contains the GitHub IDs of the members of the team that * owns the repository that contains the issue or pull request for which we want to get * the time of the first response *
func IsClosed ¶
func IsClosed[C IssueOrPullRequest](contrib C) bool
Types ¶
type Issue ¶
type Issue struct {
cmd.IssueOrPrBase
}
* Define a few types that we can use to define (ane extract data from) the body of the GraphQL * query that will be used to retrieve the list of open issues in the named GitHub organization(s)
func (*Issue) GetClosedAt ¶
func (*Issue) GetComments ¶
func (*Issue) GetCreatedAt ¶
type IssueOrPullRequest ¶
type IssueSearchEdges ¶
type PrSearchEdges ¶
type PrSearchEdges []struct { Cursor githubv4.String Node struct { PullRequest `graphql:"... on PullRequest"` } }
type PullRequest ¶
type PullRequest struct {
cmd.IssueOrPrBase
}
* Define a few types that we can use to define (ane extract data from) the body of the GraphQL * query that will be used to retrieve the list of open PRs in the named GitHub organization(s)
func (*PullRequest) GetClosedAt ¶
func (p *PullRequest) GetClosedAt() githubv4.DateTime
func (*PullRequest) GetComments ¶
func (p *PullRequest) GetComments() cmd.Comments
func (*PullRequest) GetCreatedAt ¶
func (p *PullRequest) GetCreatedAt() githubv4.DateTime
func (*PullRequest) IsClosed ¶
func (p *PullRequest) IsClosed() bool
* define a few functions to get the values we'll need from the underling PullRequest