models

package
v0.9.0-test1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubCommit

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

	common.NoPKModel
}

type GithubIssue

type GithubIssue struct {
	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
	Title           string
	Body            string
	Priority        string
	Type            string
	Status          string
	AssigneeId      int
	AssigneeName    string
	LeadTimeMinutes uint
	ClosedAt        *time.Time
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time
	Severity        string
	Component       string
	common.NoPKModel
}

type GithubIssueComment added in v0.3.0

type GithubIssueComment struct {
	GithubId        int `gorm:"primaryKey"`
	IssueId         int `gorm:"index;comment:References the Issue"`
	IssueNumber     int `gorm:"index;comment:References the Issue Number"`
	Body            string
	AuthorUsername  string
	GithubCreatedAt time.Time

	common.NoPKModel
}

type GithubIssueEvent added in v0.3.0

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

type GithubIssueLabel added in v0.3.0

type GithubIssueLabel struct {
	IssueId   int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName string `gorm:"primaryKey"`
	common.NoPKModel
}

type GithubPullRequest

type GithubPullRequest struct {
	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
	Title           string
	GithubCreatedAt time.Time
	GithubUpdatedAt *time.Time
	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
	Component      string
	MergeCommitSha string `gorm:"type:char(40)"`
	HeadRef        string
	BaseRef        string
	BaseCommitSha  string
	HeadCommitSha  string
	common.NoPKModel
}

type GithubPullRequestComment

type GithubPullRequestComment struct {
	GithubId        int `gorm:"primaryKey"`
	PullRequestId   int `gorm:"index"`
	Body            string
	AuthorUsername  string
	GithubCreatedAt time.Time

	common.NoPKModel
}

type GithubPullRequestCommit

type GithubPullRequestCommit struct {
	CommitSha     string `gorm:"primaryKey"`
	PullRequestId int    `gorm:"primaryKey;autoIncrement:false"`
	common.NoPKModel
}

type GithubPullRequestIssue added in v0.9.0

type GithubPullRequestIssue struct {
	PullRequestId int `gorm:"primaryKey"`
	IssueId       int `gorm:"primaryKey"`
	PullNumber    int
	IssueNumber   int
}

type GithubPullRequestLabel

type GithubPullRequestLabel struct {
	PullId    int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName string `gorm:"primaryKey"`
	common.NoPKModel
}

type GithubRepo added in v0.7.0

type GithubRepo struct {
	GithubId       int `gorm:"primaryKey"`
	Name           string
	HTMLUrl        string
	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"`

	common.NoPKModel
}

type GithubRepoCommit added in v0.6.0

type GithubRepoCommit struct {
	RepoId    int    `gorm:"primaryKey"`
	CommitSha string `gorm:"primaryKey;type:char(40)"`
}

type GithubReviewer

type GithubReviewer struct {
	GithubId      int `gorm:"primaryKey"`
	Login         string
	PullRequestId int

	common.NoPKModel
}

type GithubUser added in v0.6.0

type GithubUser struct {
	common.NoPKModel

	Id        int    `json:"id" gorm:"primaryKey"`
	Login     string `json:"login" gorm:"type:varchar(255)"`
	AvatarUrl string `json:"avatar_url" gorm:"type:varchar(255)"`
	Url       string `json:"url"`
	HtmlUrl   string `json:"html_url"`
	Type      string `json:"type"`
}

Jump to

Keyboard shortcuts

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