github

package
v0.0.0-...-2b6864c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ProviderID ...
	ProviderID = "github"
)

Variables

This section is empty.

Functions

func NewDefaultHookProvider

func NewDefaultHookProvider() hookCommon.Provider

NewDefaultHookProvider ...

func NewHookProvider

func NewHookProvider(timeProvider hookCommon.TimeProvider) hookCommon.Provider

NewHookProvider ...

Types

type BranchInfoModel

type BranchInfoModel struct {
	Ref        string        `json:"ref"`
	CommitHash string        `json:"sha"`
	Repo       RepoInfoModel `json:"repo"`
}

BranchInfoModel ...

type CommitModel

type CommitModel struct {
	bitriseapi.CommitPaths
	Distinct      bool   `json:"distinct"`
	CommitHash    string `json:"id"`
	CommitMessage string `json:"message"`
}

CommitModel ...

type HookProvider

type HookProvider struct {
	// contains filtered or unexported fields
}

HookProvider ...

func (HookProvider) GatherMetrics

func (hp HookProvider) GatherMetrics(r *http.Request, appSlug string) ([]common.Metrics, error)

GatherMetrics ...

func (HookProvider) TransformRequest

func (hp HookProvider) TransformRequest(r *http.Request) hookCommon.TransformResultModel

TransformRequest ...

type LabelInfoModel

type LabelInfoModel struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

LabelInfoModel ...

type PullRequestChangeFromItemModel

type PullRequestChangeFromItemModel struct {
	From string `json:"from"`
}

PullRequestChangeFromItemModel ...

type PullRequestChangesInfoModel

type PullRequestChangesInfoModel struct {
	Title PullRequestChangeFromItemModel `json:"title"`
	Body  PullRequestChangeFromItemModel `json:"body"`
	Base  interface{}                    `json:"base"`
}

PullRequestChangesInfoModel ...

type PullRequestEventModel

type PullRequestEventModel struct {
	Action          string                      `json:"action"`
	PullRequestID   int                         `json:"number"`
	PullRequestInfo PullRequestInfoModel        `json:"pull_request"`
	Changes         PullRequestChangesInfoModel `json:"changes"`
	Label           *LabelInfoModel             `json:"label"`
	Sender          UserModel                   `json:"sender"`
}

PullRequestEventModel ...

type PullRequestInfoModel

type PullRequestInfoModel struct {
	// source branch for the pull request
	HeadBranchInfo BranchInfoModel `json:"head"`
	// destination branch for the pull request
	BaseBranchInfo BranchInfoModel  `json:"base"`
	Title          string           `json:"title"`
	Body           string           `json:"body"`
	Merged         bool             `json:"merged"`
	Mergeable      *bool            `json:"mergeable"`
	Draft          bool             `json:"draft"`
	DiffURL        string           `json:"diff_url"`
	User           UserModel        `json:"user"`
	Labels         []LabelInfoModel `json:"labels"`
}

PullRequestInfoModel ...

type PushEventModel

type PushEventModel struct {
	Ref        string        `json:"ref"`
	Deleted    bool          `json:"deleted"`
	HeadCommit CommitModel   `json:"head_commit"`
	Commits    []CommitModel `json:"commits"`
	Repo       RepoInfoModel `json:"repository"`
	Pusher     PusherModel   `json:"pusher"`
}

PushEventModel ...

type PusherModel

type PusherModel struct {
	Name string `json:"name"`
}

PusherModel ...

type RepoInfoModel

type RepoInfoModel struct {
	Private bool `json:"private"`
	// Private git clone URL, used with SSH key
	SSHURL string `json:"ssh_url"`
	// Public git clone url
	CloneURL string `json:"clone_url"`
	// Owner information
	Owner UserModel `json:"owner"`
}

RepoInfoModel ...

type UserModel

type UserModel struct {
	Login string `json:"login"`
}

UserModel ...

Jump to

Keyboard shortcuts

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