webhook

package
v1.25.0-dev Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 0 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HookEvent added in v1.19.0

type HookEvent struct {
	PushOnly       bool   `json:"push_only"`
	SendEverything bool   `json:"send_everything"`
	ChooseEvents   bool   `json:"choose_events"`
	BranchFilter   string `json:"branch_filter"`

	HookEvents `json:"events"`
}

HookEvent represents events that will delivery hook.

type HookEventType added in v1.19.0

type HookEventType string

HookEventType is the type of a hook event

const (
	HookEventCreate                    HookEventType = "create"
	HookEventDelete                    HookEventType = "delete"
	HookEventFork                      HookEventType = "fork"
	HookEventPush                      HookEventType = "push"
	HookEventIssues                    HookEventType = "issues"
	HookEventIssueAssign               HookEventType = "issue_assign"
	HookEventIssueLabel                HookEventType = "issue_label"
	HookEventIssueMilestone            HookEventType = "issue_milestone"
	HookEventIssueComment              HookEventType = "issue_comment"
	HookEventPullRequest               HookEventType = "pull_request"
	HookEventPullRequestAssign         HookEventType = "pull_request_assign"
	HookEventPullRequestLabel          HookEventType = "pull_request_label"
	HookEventPullRequestMilestone      HookEventType = "pull_request_milestone"
	HookEventPullRequestComment        HookEventType = "pull_request_comment"
	HookEventPullRequestReviewApproved HookEventType = "pull_request_review_approved"
	HookEventPullRequestReviewRejected HookEventType = "pull_request_review_rejected"
	HookEventPullRequestReviewComment  HookEventType = "pull_request_review_comment"
	HookEventPullRequestSync           HookEventType = "pull_request_sync"
	HookEventPullRequestReviewRequest  HookEventType = "pull_request_review_request"
	HookEventWiki                      HookEventType = "wiki"
	HookEventRepository                HookEventType = "repository"
	HookEventRelease                   HookEventType = "release"
	HookEventPackage                   HookEventType = "package"
	HookEventStatus                    HookEventType = "status"

	// FIXME: This event should be a group of pull_request_review_xxx events
	HookEventPullRequestReview HookEventType = "pull_request_review"
	// Actions event only
	HookEventSchedule    HookEventType = "schedule"
	HookEventWorkflowJob HookEventType = "workflow_job"
)

Types of hook events

func AllEvents

func AllEvents() []HookEventType

func (HookEventType) Event added in v1.19.0

func (h HookEventType) Event() string

Event returns the HookEventType as an event string

func (HookEventType) IsPullRequest

func (h HookEventType) IsPullRequest() bool

type HookEvents added in v1.19.0

type HookEvents map[HookEventType]bool

func (HookEvents) Get

func (he HookEvents) Get(evt HookEventType) bool

type HookStatus added in v1.19.0

type HookStatus int

HookStatus is the status of a web hook

const (
	HookStatusNone HookStatus = iota
	HookStatusSucceed
	HookStatusFail
)

Possible statuses of a web hook

type HookType added in v1.19.0

type HookType = string

HookType is the type of a webhook

const (
	GITEA      HookType = "gitea"
	GOGS       HookType = "gogs"
	SLACK      HookType = "slack"
	DISCORD    HookType = "discord"
	DINGTALK   HookType = "dingtalk"
	TELEGRAM   HookType = "telegram"
	MSTEAMS    HookType = "msteams"
	FEISHU     HookType = "feishu"
	MATRIX     HookType = "matrix"
	WECHATWORK HookType = "wechatwork"
	PACKAGIST  HookType = "packagist"
)

Types of webhooks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳