Documentation ¶
Index ¶
- Constants
- func ToJSON(v any) (json.RawMessage, error)
- type Approvals
- type BranchPattern
- type BranchRule
- type Bypass
- type CheckUsersInput
- type CheckUsersOutput
- type CodeComment
- type Comment
- type Comments
- type Definition
- type Hook
- type Hunk
- type Label
- type LabelsInput
- type Lifecycle
- type Merge
- type PRsImportInput
- type Perm
- type PullReq
- type PullRequest
- type PullRequestData
- type Reference
- type Repository
- type RepositoryData
- type Response
- type Rule
- type RuleType
- type RulesInput
- type StatusChecks
- type User
- type Visibility
- type WebhookData
- type WebhookInput
Constants ¶
View Source
const ( InfoFileName = "info.json" ExporterLogsFileName = "ExporterLogs.log" PullRequestDir = "pr" GitDir = "git" WebhookFileName = "webhooks.json" BranchRulesFileName = "branch_rules.json" LabelsFileName = "labels.json" UsersFileName = "users.json" RuleTypeBranch RuleType = "branch" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BranchPattern ¶
type BranchPattern struct { Default bool `json:"default,omitempty"` Include []string `json:"include,omitempty"` Exclude []string `json:"exclude,omitempty"` }
func (*BranchPattern) JSON ¶
func (p *BranchPattern) JSON() json.RawMessage
type BranchRule ¶
type BranchRule struct { ID int `json:"id"` Identifier string `json:"identifier"` State string `json:"state"` Definition Definition `json:"definition"` Pattern BranchPattern `json:"pattern"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
type CheckUsersInput ¶
type CheckUsersInput struct {
Emails []string `json:"emails"`
}
CheckUsersInput is object for checking users existence during repo(s) import.
type CheckUsersOutput ¶
type CheckUsersOutput struct {
UnknownEmails []string `json:"unknown_emails"`
}
CheckUsersOutput is output object for checking users existence.
type CodeComment ¶
type Comments ¶
type Comments struct {
RequireResolveAll bool `json:"require_resolve_all,omitempty"`
}
type Definition ¶
type Definition struct { Bypass Bypass `json:"bypass,omitempty"` PullReq PullReq `json:"pullreq,omitempty"` Lifecycle Lifecycle `json:"lifecycle,omitempty"` }
func (*Definition) JSON ¶
func (d *Definition) JSON() json.RawMessage
type Hook ¶
type Hook struct { ID string `json:"id"` Identifier string `json:"identifier"` Target string `json:"target"` Events []string `json:"events"` Active bool `json:"active"` SkipVerify bool `json:"skip_verify"` }
Hook represents a repository hook.
type LabelsInput ¶ added in v0.24.0
type LabelsInput struct {
Labels []*Label `json:"labels"`
}
type Lifecycle ¶
type Lifecycle struct { CreateForbidden bool `json:"create_forbidden,omitempty"` DeleteForbidden bool `json:"delete_forbidden,omitempty"` UpdateForbidden bool `json:"update_forbidden,omitempty"` UpdateForceForbidden bool `json:"update_force_forbidden,omitempty"` }
Lifecycle represents the lifecycle rules for branches.
type PRsImportInput ¶
type PRsImportInput struct {
PullRequestData []*PullRequestData `json:"pull_request_data"`
}
type PullRequest ¶
type PullRequest struct { Number int `json:"number"` Title string `json:"title"` Body string `json:"body"` SHA string `json:"sha"` Ref string `json:"ref"` Source string `json:"source"` Target string `json:"target"` Fork string `json:"fork"` Link string `json:"link"` Diff string `json:"diff"` Draft bool `json:"draft"` Closed bool `json:"closed"` Merged bool `json:"merged"` Merge string `json:"merge"` Base Reference `json:"base"` Head Reference `json:"head"` Author User `json:"author"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Labels []Label `json:"labels"` }
type PullRequestData ¶
type PullRequestData struct { PullRequest PullRequest `json:"pull_request"` Comments []Comment `json:"comments"` }
type Reference ¶
type Reference struct { Name string `json:"name"` Path string `json:"path"` SHA string `json:"sha"` }
Reference represents a git reference.
type Repository ¶
type Repository struct { Slug string `json:"slug"` ID string `json:"id"` Namespace string `json:"namespace"` Name string `json:"name"` Branch string `json:"branch"` Archived bool `json:"archived"` Private bool `json:"private"` Visibility Visibility `json:"visibility"` Clone string `json:"clone"` CloneSSH string `json:"clone_ssh"` Link string `json:"link"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` IsEmpty bool `json:"is_empty"` }
type RepositoryData ¶
type RepositoryData struct { Repository Repository `json:"repository"` PullRequestData []*PullRequestData `json:"pull_request_data"` BranchRules []*BranchRule `json:"branch_rules"` Webhooks WebhookData `json:"webhooks"` Labels []Label `json:"labels"` }
type RulesInput ¶
type StatusChecks ¶
type StatusChecks struct {
RequireIdentifiers []string `json:"require_uids,omitempty"`
}
type User ¶
type User struct { ID string `json:"id"` Login string `json:"login"` Name string `json:"name"` Email string `json:"email"` Avatar string `json:"avatar"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
User represents a user account.
type Visibility ¶
type Visibility int
const ( VisibilityUndefined Visibility = iota VisibilityPublic VisibilityInternal VisibilityPrivate )
Role values.
type WebhookData ¶
type WebhookData struct {
Hooks []*Hook `json:"hooks"`
}
type WebhookInput ¶
type WebhookInput struct {
WebhookData
}
Click to show internal directories.
Click to hide internal directories.