archived

package
v0.0.0-...-7d3b672 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubAccount

type GithubAccount struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           int    `json:"id" gorm:"primaryKey;autoIncrement:false"`
	Login        string `json:"login" gorm:"type:varchar(255)"`
	AvatarUrl    string `json:"avatar_url" gorm:"type:varchar(255)"`
	Url          string `json:"url" gorm:"type:varchar(255)"`
	HtmlUrl      string `json:"html_url" gorm:"type:varchar(255)"`
	Type         string `json:"type" gorm:"type:varchar(255)"`
	Name         string `json:"name" gorm:"type:varchar(255)"`
	Company      string `json:"company" gorm:"type:varchar(255)"`
	Email        string `json:"Email" gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubAccount) TableName

func (GithubAccount) TableName() string

type GithubAccountOrg

type GithubAccountOrg struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	AccountId    int    `gorm:"primaryKey;autoIncrement:false"`
	OrgId        int    `gorm:"primaryKey;autoIncrement:false"`
	OrgLogin     string `json:"org_login" gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubAccountOrg) TableName

func (GithubAccountOrg) TableName() string

type GithubCommit

type GithubCommit struct {
	Sha            string `gorm:"primaryKey;type:varchar(40)"`
	AuthorId       int
	AuthorName     string `gorm:"type:varchar(255)"`
	AuthorEmail    string `gorm:"type:varchar(255)"`
	AuthoredDate   time.Time
	CommitterId    int
	CommitterName  string `gorm:"type:varchar(255)"`
	CommitterEmail string `gorm:"type:varchar(255)"`
	CommittedDate  time.Time
	Message        string
	Url            string `gorm:"type:varchar(255)"`
	Additions      int    `gorm:"comment:Added lines of code"`
	Deletions      int    `gorm:"comment:Deleted lines of code"`
	archived.NoPKModel
}

func (GithubCommit) TableName

func (GithubCommit) TableName() string

type GithubCommitStat

type GithubCommitStat struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	Sha          string `gorm:"primaryKey;type:varchar(40)"`
	Additions    int    `gorm:"comment:Added lines of code"`
	Deletions    int    `gorm:"comment:Deleted lines of code"`

	CommittedDate time.Time `gorm:"index"`
	archived.NoPKModel
}

func (GithubCommitStat) TableName

func (GithubCommitStat) TableName() string

type GithubConnection

type GithubConnection struct {
	archived.Model
	Name             string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"`
	Endpoint         string `mapstructure:"endpoint" env:"GITHUB_ENDPOINT" validate:"required"`
	Proxy            string `mapstructure:"proxy" env:"GITHUB_PROXY"`
	RateLimitPerHour int    `comment:"api request rate limit per hour"`
	Token            string `mapstructure:"token" env:"GITHUB_AUTH" validate:"required" encrypt:"yes"`
}

func (GithubConnection) TableName

func (GithubConnection) TableName() string

type GithubIssue

type GithubIssue struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	RepoId          int    `gorm:"index"`
	Number          int    `gorm:"index;comment:Used in API requests ex. api/repo/1/issue/<THIS_NUMBER>"`
	State           string `gorm:"type:varchar(255)"`
	Title           string
	Body            string
	Priority        string `gorm:"type:varchar(255)"`
	Type            string `gorm:"type:varchar(100)"`
	Status          string `gorm:"type:varchar(255)"`
	AuthorId        int
	AuthorName      string `gorm:"type:varchar(255)"`
	AssigneeId      int
	AssigneeName    string `gorm:"type:varchar(255)"`
	MilestoneId     int    `gorm:"index"`
	LeadTimeMinutes uint
	Url             string `gorm:"type:varchar(255)"`
	ClosedAt        *time.Time
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	Severity        string    `gorm:"type:varchar(255)"`
	Component       string    `gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubIssue) TableName

func (GithubIssue) TableName() string

type GithubIssueComment

type GithubIssueComment struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	IssueId         int    `gorm:"index;comment:References the Issue"`
	Body            string
	AuthorUsername  string `gorm:"type:varchar(255)"`
	AuthorUserId    int
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	archived.NoPKModel
}

func (GithubIssueComment) TableName

func (GithubIssueComment) TableName() string

type GithubIssueEvent

type GithubIssueEvent struct {
	ConnectionId    uint64    `gorm:"primaryKey"`
	GithubId        int       `gorm:"primaryKey"`
	IssueId         int       `gorm:"index;comment:References the Issue"`
	Type            string    `gorm:"type:varchar(255);comment:Events that can occur to an issue, ex. assigned, closed, labeled, etc."`
	AuthorUsername  string    `gorm:"type:varchar(255)"`
	GithubCreatedAt time.Time `gorm:"index"`
	archived.NoPKModel
}

func (GithubIssueEvent) TableName

func (GithubIssueEvent) TableName() string

type GithubIssueLabel

type GithubIssueLabel struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	IssueId      int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName    string `gorm:"primaryKey;type:varchar(255)"`
	archived.NoPKModel
}

func (GithubIssueLabel) TableName

func (GithubIssueLabel) TableName() string

type GithubJob

type GithubJob struct {
	archived.NoPKModel
	ConnectionId  uint64         `gorm:"primaryKey"`
	RepoId        int            `gorm:"primaryKey"`
	ID            int            `json:"id" gorm:"primaryKey;autoIncrement:false"`
	RunID         int            `json:"run_id"`
	RunURL        string         `json:"run_url" gorm:"type:varchar(255)"`
	NodeID        string         `json:"node_id" gorm:"type:varchar(255)"`
	HeadSha       string         `json:"head_sha" gorm:"type:varchar(255)"`
	URL           string         `json:"url" gorm:"type:varchar(255)"`
	HTMLURL       string         `json:"html_url" gorm:"type:varchar(255)"`
	Status        string         `json:"status" gorm:"type:varchar(255)"`
	Conclusion    string         `json:"conclusion" gorm:"type:varchar(255)"`
	StartedAt     *time.Time     `json:"started_at"`
	CompletedAt   *time.Time     `json:"completed_at"`
	Name          string         `json:"name" gorm:"type:varchar(255)"`
	Steps         datatypes.JSON `json:"steps"`
	CheckRunURL   string         `json:"check_run_url" gorm:"type:varchar(255)"`
	Labels        datatypes.JSON `json:"labels"`
	RunnerID      int            `json:"runner_id"`
	RunnerName    string         `json:"runner_name" gorm:"type:varchar(255)"`
	RunnerGroupID int            `json:"runner_group_id"`
	Type          string         `json:"type" gorm:"type:varchar(255)"`
}

func (GithubJob) TableName

func (GithubJob) TableName() string

type GithubMilestone

type GithubMilestone struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	MilestoneId  int    `gorm:"primaryKey;autoIncrement:false"`
	RepoId       int
	Number       int
	URL          string
	Title        string
	OpenIssues   int
	ClosedIssues int
	State        string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	ClosedAt     *time.Time
	archived.NoPKModel
}

func (GithubMilestone) TableName

func (GithubMilestone) TableName() string

type GithubPipeline

type GithubPipeline struct {
	archived.NoPKModel
	ConnectionId uint64     `gorm:"primaryKey"`
	RepoId       int        `gorm:"primaryKey"`
	Branch       string     `json:"branch" gorm:"primaryKey;type:varchar(255)"`
	Commit       string     `json:"commit" gorm:"primaryKey;type:varchar(255)"`
	StartedDate  *time.Time `json:"started_time"`
	FinishedDate *time.Time `json:"finished_time"`
	Duration     float64    `json:"duration"`
	Status       string     `json:"status" gorm:"type:varchar(255)"`
	Result       string     `json:"results" gorm:"type:varchar(255)"`
	Type         string     `json:"type" gorm:"type:varchar(255)"`
}

func (GithubPipeline) TableName

func (GithubPipeline) TableName() string

type GithubPrComment

type GithubPrComment struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	PullRequestId   int    `gorm:"index"`
	Body            string
	AuthorUsername  string `gorm:"type:varchar(255)"`
	AuthorUserId    int
	CommitSha       string `gorm:"type:varchar(255)"`
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	ReviewId        int
	Type            string `gorm:"index;type:varchar(255)"`
	archived.NoPKModel
}

func (GithubPrComment) TableName

func (GithubPrComment) TableName() string

type GithubPrCommit

type GithubPrCommit struct {
	ConnectionId  uint64 `gorm:"primaryKey"`
	CommitSha     string `gorm:"primaryKey;type:varchar(40)"`
	PullRequestId int    `gorm:"primaryKey;autoIncrement:false"`
	archived.NoPKModel
}

func (GithubPrCommit) TableName

func (GithubPrCommit) TableName() string

type GithubPrIssue

type GithubPrIssue struct {
	ConnectionId      uint64 `gorm:"primaryKey"`
	PullRequestId     int    `gorm:"primaryKey"`
	IssueId           int    `gorm:"primaryKey"`
	PullRequestNumber int
	IssueNumber       int
	archived.NoPKModel
}

func (GithubPrIssue) TableName

func (GithubPrIssue) TableName() string

type GithubPrLabel

type GithubPrLabel struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	PullId       int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName    string `gorm:"primaryKey;type:varchar(255)"`
	archived.NoPKModel
}

func (GithubPrLabel) TableName

func (GithubPrLabel) TableName() string

type GithubPrReview

type GithubPrReview struct {
	ConnectionId   uint64 `gorm:"primaryKey"`
	GithubId       int    `gorm:"primaryKey"`
	PullRequestId  int    `gorm:"index"`
	Body           string
	AuthorUsername string `gorm:"type:varchar(255)"`
	AuthorUserId   int
	GithubSubmitAt time.Time
	CommitSha      string `gorm:"type:varchar(255)"`
	State          string `gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubPrReview) TableName

func (GithubPrReview) TableName() string

type GithubPullRequest

type GithubPullRequest struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	RepoId          int    `gorm:"index"`
	Number          int    `gorm:"index"` // This number is used in GET requests to the API associated to reviewers / comments / etc.
	State           string `gorm:"type:varchar(255)"`
	Title           string
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	ClosedAt        *time.Time
	// In order to get the following fields, we need to collect PRs individually from GitHub
	Additions      int
	Deletions      int
	Comments       int
	Commits        int
	ReviewComments int
	Merged         bool
	MergedAt       *time.Time
	Body           string
	Type           string `gorm:"type:varchar(255)"`
	Component      string `gorm:"type:varchar(255)"`
	MergeCommitSha string `gorm:"type:varchar(40)"`
	HeadRef        string `gorm:"type:varchar(255)"`
	BaseRef        string `gorm:"type:varchar(255)"`
	BaseCommitSha  string `gorm:"type:varchar(255)"`
	HeadCommitSha  string `gorm:"type:varchar(255)"`
	Url            string `gorm:"type:varchar(255)"`
	AuthorName     string `gorm:"type:varchar(100)"`
	AuthorId       int
	archived.NoPKModel
}

func (GithubPullRequest) TableName

func (GithubPullRequest) TableName() string

type GithubRepo

type GithubRepo struct {
	ConnectionId   uint64 `gorm:"primaryKey"`
	GithubId       int    `gorm:"primaryKey"`
	Name           string `gorm:"type:varchar(255)"`
	HTMLUrl        string `gorm:"type:varchar(255)"`
	Description    string
	OwnerId        int        `json:"ownerId"`
	OwnerLogin     string     `json:"ownerLogin" gorm:"type:varchar(255)"`
	Language       string     `json:"language" gorm:"type:varchar(255)"`
	ParentGithubId int        `json:"parentId"`
	ParentHTMLUrl  string     `json:"parentHtmlUrl"`
	CreatedDate    *time.Time `json:"createdDate"`
	UpdatedDate    *time.Time `json:"updatedDate"`
	archived.NoPKModel
}

func (GithubRepo) TableName

func (GithubRepo) TableName() string

type GithubRepoAccount

type GithubRepoAccount struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	AccountId    int    `gorm:"primaryKey;autoIncrement:false"`
	RepoGithubId int    `gorm:"primaryKey;autoIncrement:false"`
	Login        string `json:"login" gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubRepoAccount) TableName

func (GithubRepoAccount) TableName() string

type GithubRepoCommit

type GithubRepoCommit struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	RepoId       int    `gorm:"primaryKey"`
	CommitSha    string `gorm:"primaryKey;type:varchar(40)"`
	archived.NoPKModel
}

func (GithubRepoCommit) TableName

func (GithubRepoCommit) TableName() string

type GithubReviewer

type GithubReviewer struct {
	ConnectionId  uint64 `gorm:"primaryKey"`
	GithubId      int    `gorm:"primaryKey"`
	Login         string `gorm:"type:varchar(255)"`
	PullRequestId int    `gorm:"primaryKey"`

	archived.NoPKModel
}

func (GithubReviewer) TableName

func (GithubReviewer) TableName() string

type GithubRun

type GithubRun struct {
	ConnectionId     uint64     `gorm:"primaryKey"`
	RepoId           int        `gorm:"primaryKey"`
	ID               int64      `json:"id" gorm:"primaryKey;autoIncrement:false"`
	Name             string     `json:"name" gorm:"type:varchar(255)"`
	NodeID           string     `json:"node_id" gorm:"type:varchar(255)"`
	HeadBranch       string     `json:"head_branch" gorm:"type:varchar(255)"`
	HeadSha          string     `json:"head_sha" gorm:"type:varchar(255)"`
	Path             string     `json:"path" gorm:"type:varchar(255)"`
	RunNumber        int        `json:"run_number"`
	Event            string     `json:"event" gorm:"type:varchar(255)"`
	Status           string     `json:"status" gorm:"type:varchar(255)"`
	Conclusion       string     `json:"conclusion" gorm:"type:varchar(255)"`
	WorkflowID       int        `json:"workflow_id"`
	CheckSuiteID     int64      `json:"check_suite_id"`
	CheckSuiteNodeID string     `json:"check_suite_node_id" gorm:"type:varchar(255)"`
	URL              string     `json:"url" gorm:"type:varchar(255)"`
	HTMLURL          string     `json:"html_url" gorm:"type:varchar(255)"`
	GithubCreatedAt  *time.Time `json:"created_at"`
	GithubUpdatedAt  *time.Time `json:"updated_at"`
	RunAttempt       int        `json:"run_attempt"`
	RunStartedAt     *time.Time `json:"run_started_at"`
	JobsURL          string     `json:"jobs_url" gorm:"type:varchar(255)"`
	LogsURL          string     `json:"logs_url" gorm:"type:varchar(255)"`
	CheckSuiteURL    string     `json:"check_suite_url" gorm:"type:varchar(255)"`
	ArtifactsURL     string     `json:"artifacts_url" gorm:"type:varchar(255)"`
	CancelURL        string     `json:"cancel_url" gorm:"type:varchar(255)"`
	RerunURL         string     `json:"rerun_url" gorm:"type:varchar(255)"`
	WorkflowURL      string     `json:"workflow_url" gorm:"type:varchar(255)"`
	Type             string     `json:"type" gorm:"type:varchar(255)"`
	archived.NoPKModel
}

func (GithubRun) TableName

func (GithubRun) TableName() string

type GithubTransformationRule

type GithubTransformationRule struct {
	archived.Model
	Name                 string `mapstructure:"name" json:"name" gorm:"type:varchar(255);index:idx_name_github,unique" validate:"required"`
	PrType               string `mapstructure:"prType" json:"prType" gorm:"type:varchar(255)"`
	PrComponent          string `mapstructure:"prComponent" json:"prComponent" gorm:"type:varchar(255)"`
	PrBodyClosePattern   string `mapstructure:"prBodyClosePattern" json:"prBodyClosePattern" gorm:"type:varchar(255)"`
	IssueSeverity        string `mapstructure:"issueSeverity" json:"issueSeverity" gorm:"type:varchar(255)"`
	IssuePriority        string `mapstructure:"issuePriority" json:"issuePriority" gorm:"type:varchar(255)"`
	IssueComponent       string `mapstructure:"issueComponent" json:"issueComponent" gorm:"type:varchar(255)"`
	IssueTypeBug         string `mapstructure:"issueTypeBug" json:"issueTypeBug" gorm:"type:varchar(255)"`
	IssueTypeIncident    string `mapstructure:"issueTypeIncident" json:"issueTypeIncident" gorm:"type:varchar(255)"`
	IssueTypeRequirement string `mapstructure:"issueTypeRequirement" json:"issueTypeRequirement" gorm:"type:varchar(255)"`
	DeploymentPattern    string `mapstructure:"deploymentPattern,omitempty" json:"deploymentPattern" gorm:"type:varchar(255)"`
	ProductionPattern    string `mapstructure:"productionPattern,omitempty" json:"productionPattern" gorm:"type:varchar(255)"`
	Refdiff              datatypes.JSONMap
}

func (GithubTransformationRule) TableName

func (GithubTransformationRule) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL