Documentation ¶
Index ¶
- Constants
- type BranchNode
- type BranchNodeCompareComparison
- type BranchNodeRepository
- type BranchNodeRepositoryDefaultBranchRef
- type Config
- type Factory
- type PullRequestNode
- func (v *PullRequestNode) GetCreatedAt() time.Time
- func (v *PullRequestNode) GetHeadRefName() string
- func (v *PullRequestNode) GetMergeCommit() PullRequestNodeMergeCommit
- func (v *PullRequestNode) GetMerged() bool
- func (v *PullRequestNode) GetMergedAt() time.Time
- func (v *PullRequestNode) GetReviews() PullRequestNodeReviewsPullRequestReviewConnection
- type PullRequestNodeMergeCommit
- type PullRequestNodeMergeCommitDeploymentsDeploymentConnection
- type PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment
- type PullRequestNodeReviewsPullRequestReviewConnection
- type PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview
- type PullRequestState
- type SearchNode
- type SearchNodeApp
- type SearchNodeDefaultBranchRef
- type SearchNodeDiscussion
- type SearchNodeIssue
- type SearchNodeMarketplaceListing
- type SearchNodeOrganization
- type SearchNodePullRequest
- type SearchNodeRepository
- type SearchNodeUser
Constants ¶
const (
// TypeStr is the value of "type" key in configuration.
TypeStr = "github"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchNode ¶ added in v0.90.0
type BranchNode struct { // The ref name. Name string `json:"name"` // Compares the current ref as a base ref to another head ref, if the comparison can be made. Compare BranchNodeCompareComparison `json:"compare"` // The repository the ref belongs to. Repository BranchNodeRepository `json:"repository"` }
BranchNode includes the requested fields of the GraphQL type Ref. The GraphQL type's documentation follows.
Represents a Git reference.
func (*BranchNode) GetCompare ¶ added in v0.90.0
func (v *BranchNode) GetCompare() BranchNodeCompareComparison
GetCompare returns BranchNode.Compare, and is useful for accessing the field via an interface.
func (*BranchNode) GetName ¶ added in v0.90.0
func (v *BranchNode) GetName() string
GetName returns BranchNode.Name, and is useful for accessing the field via an interface.
func (*BranchNode) GetRepository ¶ added in v0.90.0
func (v *BranchNode) GetRepository() BranchNodeRepository
GetRepository returns BranchNode.Repository, and is useful for accessing the field via an interface.
type BranchNodeCompareComparison ¶ added in v0.90.0
type BranchNodeCompareComparison struct { // The number of commits ahead of the base branch. AheadBy int `json:"aheadBy"` // The number of commits behind the base branch. BehindBy int `json:"behindBy"` }
BranchNodeCompareComparison includes the requested fields of the GraphQL type Comparison. The GraphQL type's documentation follows.
Represents a comparison between two commit revisions.
func (*BranchNodeCompareComparison) GetAheadBy ¶ added in v0.90.0
func (v *BranchNodeCompareComparison) GetAheadBy() int
GetAheadBy returns BranchNodeCompareComparison.AheadBy, and is useful for accessing the field via an interface.
func (*BranchNodeCompareComparison) GetBehindBy ¶ added in v0.90.0
func (v *BranchNodeCompareComparison) GetBehindBy() int
GetBehindBy returns BranchNodeCompareComparison.BehindBy, and is useful for accessing the field via an interface.
type BranchNodeRepository ¶ added in v0.90.0
type BranchNodeRepository struct { // The name of the repository. Name string `json:"name"` // The Ref associated with the repository's default branch. DefaultBranchRef BranchNodeRepositoryDefaultBranchRef `json:"defaultBranchRef"` }
BranchNodeRepository includes the requested fields of the GraphQL type Repository. The GraphQL type's documentation follows.
A repository contains the content for a project.
func (*BranchNodeRepository) GetDefaultBranchRef ¶ added in v0.90.0
func (v *BranchNodeRepository) GetDefaultBranchRef() BranchNodeRepositoryDefaultBranchRef
GetDefaultBranchRef returns BranchNodeRepository.DefaultBranchRef, and is useful for accessing the field via an interface.
func (*BranchNodeRepository) GetName ¶ added in v0.90.0
func (v *BranchNodeRepository) GetName() string
GetName returns BranchNodeRepository.Name, and is useful for accessing the field via an interface.
type BranchNodeRepositoryDefaultBranchRef ¶ added in v0.90.0
type BranchNodeRepositoryDefaultBranchRef struct { // The ref name. Name string `json:"name"` }
BranchNodeRepositoryDefaultBranchRef includes the requested fields of the GraphQL type Ref. The GraphQL type's documentation follows.
Represents a Git reference.
func (*BranchNodeRepositoryDefaultBranchRef) GetName ¶ added in v0.90.0
func (v *BranchNodeRepositoryDefaultBranchRef) GetName() string
GetName returns BranchNodeRepositoryDefaultBranchRef.Name, and is useful for accessing the field via an interface.
type Config ¶
type Config struct { metadata.MetricsBuilderConfig `mapstructure:",squash"` confighttp.ClientConfig `mapstructure:",squash"` internal.ScraperConfig // GitHubOrg is the name of the GitHub organization to srape (github scraper only) GitHubOrg string `mapstructure:"github_org"` // SearchQuery is the query to use when defining a custom search for repository data SearchQuery string `mapstructure:"search_query"` }
Config relating to Github Metric Scraper.
type Factory ¶
type Factory struct{}
func (*Factory) CreateDefaultConfig ¶
func (*Factory) CreateMetricsScraper ¶
func (f *Factory) CreateMetricsScraper( ctx context.Context, params receiver.CreateSettings, cfg internal.Config, ) (scraperhelper.Scraper, error)
type PullRequestNode ¶ added in v0.94.0
type PullRequestNode struct { // Identifies the date and time when the object was created. CreatedAt time.Time `json:"createdAt"` // Whether or not the pull request was merged. Merged bool `json:"merged"` // The date and time that the pull request was merged. MergedAt time.Time `json:"mergedAt"` // The commit that was created when this pull request was merged. MergeCommit PullRequestNodeMergeCommit `json:"mergeCommit"` // Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. HeadRefName string `json:"headRefName"` // A list of reviews associated with the pull request. Reviews PullRequestNodeReviewsPullRequestReviewConnection `json:"reviews"` }
PullRequestNode includes the requested fields of the GraphQL type PullRequest. The GraphQL type's documentation follows.
A repository pull request.
func (*PullRequestNode) GetCreatedAt ¶ added in v0.94.0
func (v *PullRequestNode) GetCreatedAt() time.Time
GetCreatedAt returns PullRequestNode.CreatedAt, and is useful for accessing the field via an interface.
func (*PullRequestNode) GetHeadRefName ¶ added in v0.94.0
func (v *PullRequestNode) GetHeadRefName() string
GetHeadRefName returns PullRequestNode.HeadRefName, and is useful for accessing the field via an interface.
func (*PullRequestNode) GetMergeCommit ¶ added in v0.94.0
func (v *PullRequestNode) GetMergeCommit() PullRequestNodeMergeCommit
GetMergeCommit returns PullRequestNode.MergeCommit, and is useful for accessing the field via an interface.
func (*PullRequestNode) GetMerged ¶ added in v0.94.0
func (v *PullRequestNode) GetMerged() bool
GetMerged returns PullRequestNode.Merged, and is useful for accessing the field via an interface.
func (*PullRequestNode) GetMergedAt ¶ added in v0.94.0
func (v *PullRequestNode) GetMergedAt() time.Time
GetMergedAt returns PullRequestNode.MergedAt, and is useful for accessing the field via an interface.
func (*PullRequestNode) GetReviews ¶ added in v0.94.0
func (v *PullRequestNode) GetReviews() PullRequestNodeReviewsPullRequestReviewConnection
GetReviews returns PullRequestNode.Reviews, and is useful for accessing the field via an interface.
type PullRequestNodeMergeCommit ¶ added in v0.94.0
type PullRequestNodeMergeCommit struct { // The deployments associated with a commit. Deployments PullRequestNodeMergeCommitDeploymentsDeploymentConnection `json:"deployments"` }
PullRequestNodeMergeCommit includes the requested fields of the GraphQL type Commit. The GraphQL type's documentation follows.
Represents a Git commit.
func (*PullRequestNodeMergeCommit) GetDeployments ¶ added in v0.94.0
func (v *PullRequestNodeMergeCommit) GetDeployments() PullRequestNodeMergeCommitDeploymentsDeploymentConnection
GetDeployments returns PullRequestNodeMergeCommit.Deployments, and is useful for accessing the field via an interface.
type PullRequestNodeMergeCommitDeploymentsDeploymentConnection ¶ added in v0.94.0
type PullRequestNodeMergeCommitDeploymentsDeploymentConnection struct { // A list of nodes. Nodes []PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment `json:"nodes"` // Identifies the total count of items in the connection. TotalCount int `json:"totalCount"` }
PullRequestNodeMergeCommitDeploymentsDeploymentConnection includes the requested fields of the GraphQL type DeploymentConnection. The GraphQL type's documentation follows.
The connection type for Deployment.
func (*PullRequestNodeMergeCommitDeploymentsDeploymentConnection) GetNodes ¶ added in v0.94.0
func (v *PullRequestNodeMergeCommitDeploymentsDeploymentConnection) GetNodes() []PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment
GetNodes returns PullRequestNodeMergeCommitDeploymentsDeploymentConnection.Nodes, and is useful for accessing the field via an interface.
func (*PullRequestNodeMergeCommitDeploymentsDeploymentConnection) GetTotalCount ¶ added in v0.94.0
func (v *PullRequestNodeMergeCommitDeploymentsDeploymentConnection) GetTotalCount() int
GetTotalCount returns PullRequestNodeMergeCommitDeploymentsDeploymentConnection.TotalCount, and is useful for accessing the field via an interface.
type PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment ¶ added in v0.94.0
type PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment struct { // Identifies the date and time when the object was created. CreatedAt time.Time `json:"createdAt"` }
PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment includes the requested fields of the GraphQL type Deployment. The GraphQL type's documentation follows.
Represents triggered deployment instance.
func (*PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment) GetCreatedAt ¶ added in v0.94.0
func (v *PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment) GetCreatedAt() time.Time
GetCreatedAt returns PullRequestNodeMergeCommitDeploymentsDeploymentConnectionNodesDeployment.CreatedAt, and is useful for accessing the field via an interface.
type PullRequestNodeReviewsPullRequestReviewConnection ¶ added in v0.94.0
type PullRequestNodeReviewsPullRequestReviewConnection struct { // Identifies the total count of items in the connection. TotalCount int `json:"totalCount"` // A list of nodes. Nodes []PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview `json:"nodes"` }
PullRequestNodeReviewsPullRequestReviewConnection includes the requested fields of the GraphQL type PullRequestReviewConnection. The GraphQL type's documentation follows.
The connection type for PullRequestReview.
func (*PullRequestNodeReviewsPullRequestReviewConnection) GetNodes ¶ added in v0.94.0
func (v *PullRequestNodeReviewsPullRequestReviewConnection) GetNodes() []PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview
GetNodes returns PullRequestNodeReviewsPullRequestReviewConnection.Nodes, and is useful for accessing the field via an interface.
func (*PullRequestNodeReviewsPullRequestReviewConnection) GetTotalCount ¶ added in v0.94.0
func (v *PullRequestNodeReviewsPullRequestReviewConnection) GetTotalCount() int
GetTotalCount returns PullRequestNodeReviewsPullRequestReviewConnection.TotalCount, and is useful for accessing the field via an interface.
type PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview ¶ added in v0.94.0
type PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview struct { // Identifies the date and time when the object was created. CreatedAt time.Time `json:"createdAt"` }
PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview includes the requested fields of the GraphQL type PullRequestReview. The GraphQL type's documentation follows.
A review object for a given pull request.
func (*PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview) GetCreatedAt ¶ added in v0.94.0
func (v *PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview) GetCreatedAt() time.Time
GetCreatedAt returns PullRequestNodeReviewsPullRequestReviewConnectionNodesPullRequestReview.CreatedAt, and is useful for accessing the field via an interface.
type PullRequestState ¶ added in v0.94.0
type PullRequestState string
The possible states of a pull request.
const ( // A pull request that is still open. PullRequestStateOpen PullRequestState = "OPEN" // A pull request that has been closed without being merged. PullRequestStateClosed PullRequestState = "CLOSED" // A pull request that has been closed by being merged. PullRequestStateMerged PullRequestState = "MERGED" )
type SearchNode ¶ added in v0.90.0
type SearchNode interface { // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). GetTypename() string // contains filtered or unexported methods }
SearchNode includes the requested fields of the GraphQL interface SearchResultItem.
SearchNode is implemented by the following types: SearchNodeApp SearchNodeDiscussion SearchNodeIssue SearchNodeMarketplaceListing SearchNodeOrganization SearchNodePullRequest SearchNodeRepository SearchNodeUser The GraphQL type's documentation follows.
The results of a search.
type SearchNodeApp ¶ added in v0.90.0
type SearchNodeApp struct {
Typename string `json:"__typename"`
}
SearchNodeApp includes the requested fields of the GraphQL type App. The GraphQL type's documentation follows.
A GitHub App.
func (*SearchNodeApp) GetTypename ¶ added in v0.90.0
func (v *SearchNodeApp) GetTypename() string
GetTypename returns SearchNodeApp.Typename, and is useful for accessing the field via an interface.
type SearchNodeDefaultBranchRef ¶ added in v0.90.0
type SearchNodeDefaultBranchRef struct { // The ref name. Name string `json:"name"` }
SearchNodeDefaultBranchRef includes the requested fields of the GraphQL type Ref. The GraphQL type's documentation follows.
Represents a Git reference.
func (*SearchNodeDefaultBranchRef) GetName ¶ added in v0.90.0
func (v *SearchNodeDefaultBranchRef) GetName() string
GetName returns SearchNodeDefaultBranchRef.Name, and is useful for accessing the field via an interface.
type SearchNodeDiscussion ¶ added in v0.90.0
type SearchNodeDiscussion struct {
Typename string `json:"__typename"`
}
SearchNodeDiscussion includes the requested fields of the GraphQL type Discussion. The GraphQL type's documentation follows.
A discussion in a repository.
func (*SearchNodeDiscussion) GetTypename ¶ added in v0.90.0
func (v *SearchNodeDiscussion) GetTypename() string
GetTypename returns SearchNodeDiscussion.Typename, and is useful for accessing the field via an interface.
type SearchNodeIssue ¶ added in v0.90.0
type SearchNodeIssue struct {
Typename string `json:"__typename"`
}
SearchNodeIssue includes the requested fields of the GraphQL type Issue. The GraphQL type's documentation follows.
An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project.
func (*SearchNodeIssue) GetTypename ¶ added in v0.90.0
func (v *SearchNodeIssue) GetTypename() string
GetTypename returns SearchNodeIssue.Typename, and is useful for accessing the field via an interface.
type SearchNodeMarketplaceListing ¶ added in v0.90.0
type SearchNodeMarketplaceListing struct {
Typename string `json:"__typename"`
}
SearchNodeMarketplaceListing includes the requested fields of the GraphQL type MarketplaceListing. The GraphQL type's documentation follows.
A listing in the GitHub integration marketplace.
func (*SearchNodeMarketplaceListing) GetTypename ¶ added in v0.90.0
func (v *SearchNodeMarketplaceListing) GetTypename() string
GetTypename returns SearchNodeMarketplaceListing.Typename, and is useful for accessing the field via an interface.
type SearchNodeOrganization ¶ added in v0.90.0
type SearchNodeOrganization struct {
Typename string `json:"__typename"`
}
SearchNodeOrganization includes the requested fields of the GraphQL type Organization. The GraphQL type's documentation follows.
An account on GitHub, with one or more owners, that has repositories, members and teams.
func (*SearchNodeOrganization) GetTypename ¶ added in v0.90.0
func (v *SearchNodeOrganization) GetTypename() string
GetTypename returns SearchNodeOrganization.Typename, and is useful for accessing the field via an interface.
type SearchNodePullRequest ¶ added in v0.90.0
type SearchNodePullRequest struct {
Typename string `json:"__typename"`
}
SearchNodePullRequest includes the requested fields of the GraphQL type PullRequest. The GraphQL type's documentation follows.
A repository pull request.
func (*SearchNodePullRequest) GetTypename ¶ added in v0.90.0
func (v *SearchNodePullRequest) GetTypename() string
GetTypename returns SearchNodePullRequest.Typename, and is useful for accessing the field via an interface.
type SearchNodeRepository ¶ added in v0.90.0
type SearchNodeRepository struct { Typename string `json:"__typename"` Id string `json:"id"` // The name of the repository. Name string `json:"name"` // The Ref associated with the repository's default branch. DefaultBranchRef SearchNodeDefaultBranchRef `json:"defaultBranchRef"` }
SearchNodeRepository includes the requested fields of the GraphQL type Repository. The GraphQL type's documentation follows.
A repository contains the content for a project.
func (*SearchNodeRepository) GetDefaultBranchRef ¶ added in v0.90.0
func (v *SearchNodeRepository) GetDefaultBranchRef() SearchNodeDefaultBranchRef
GetDefaultBranchRef returns SearchNodeRepository.DefaultBranchRef, and is useful for accessing the field via an interface.
func (*SearchNodeRepository) GetId ¶ added in v0.90.0
func (v *SearchNodeRepository) GetId() string
GetId returns SearchNodeRepository.Id, and is useful for accessing the field via an interface.
func (*SearchNodeRepository) GetName ¶ added in v0.90.0
func (v *SearchNodeRepository) GetName() string
GetName returns SearchNodeRepository.Name, and is useful for accessing the field via an interface.
func (*SearchNodeRepository) GetTypename ¶ added in v0.90.0
func (v *SearchNodeRepository) GetTypename() string
GetTypename returns SearchNodeRepository.Typename, and is useful for accessing the field via an interface.
type SearchNodeUser ¶ added in v0.90.0
type SearchNodeUser struct {
Typename string `json:"__typename"`
}
SearchNodeUser includes the requested fields of the GraphQL type User. The GraphQL type's documentation follows.
A user is an individual's account on GitHub that owns repositories and can make new content.
func (*SearchNodeUser) GetTypename ¶ added in v0.90.0
func (v *SearchNodeUser) GetTypename() string
GetTypename returns SearchNodeUser.Typename, and is useful for accessing the field via an interface.