Help us shape the future of Go! Take the 2026 Go Developer Survey

webhooks

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdWebhooksCreate = cli.Command{
	Name:        "create",
	Aliases:     []string{"c"},
	Usage:       "Create a webhook",
	Description: "Create a webhook in repository, organization, or globally",
	ArgsUsage:   "<webhook-url>",
	Action:      runWebhooksCreate,
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "type",
			Usage: "webhook type (gitea, gogs, slack, discord, dingtalk, telegram, msteams, feishu, wechatwork, packagist)",
			Value: "gitea",
		},
		&cli.StringFlag{
			Name:  "secret",
			Usage: "webhook secret",
		},
		&cli.StringFlag{
			Name:  "events",
			Usage: "comma separated list of events",
			Value: "push",
		},
		&cli.BoolFlag{
			Name:  "active",
			Usage: "webhook is active",
			Value: true,
		},
		&cli.StringFlag{
			Name:  "branch-filter",
			Usage: "branch filter for push events",
		},
		&cli.StringFlag{
			Name:  "authorization-header",
			Usage: "authorization header",
		},
	}, flags.AllDefaultFlags...),
}

CmdWebhooksCreate represents a sub command of webhooks to create webhook

View Source
var CmdWebhooksDelete = cli.Command{
	Name:        "delete",
	Aliases:     []string{"rm"},
	Usage:       "Delete a webhook",
	Description: "Delete a webhook by ID from repository, organization, or globally",
	ArgsUsage:   "<webhook-id>",
	Action:      runWebhooksDelete,
	Flags: append([]cli.Flag{
		&cli.BoolFlag{
			Name:    "confirm",
			Aliases: []string{"y"},
			Usage:   "confirm deletion without prompting",
		},
	}, flags.AllDefaultFlags...),
}

CmdWebhooksDelete represents a sub command of webhooks to delete webhook

View Source
var CmdWebhooksList = cli.Command{
	Name:        "list",
	Aliases:     []string{"ls"},
	Usage:       "List webhooks",
	Description: "List webhooks in repository, organization, or globally",
	Action:      RunWebhooksList,
	Flags: append([]cli.Flag{
		&flags.PaginationPageFlag,
		&flags.PaginationLimitFlag,
	}, flags.AllDefaultFlags...),
}

CmdWebhooksList represents a sub command of webhooks to list webhooks

View Source
var CmdWebhooksUpdate = cli.Command{
	Name:        "update",
	Aliases:     []string{"edit", "u"},
	Usage:       "Update a webhook",
	Description: "Update webhook configuration in repository, organization, or globally",
	ArgsUsage:   "<webhook-id>",
	Action:      runWebhooksUpdate,
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "url",
			Usage: "webhook URL",
		},
		&cli.StringFlag{
			Name:  "secret",
			Usage: "webhook secret",
		},
		&cli.StringFlag{
			Name:  "events",
			Usage: "comma separated list of events",
		},
		&cli.BoolFlag{
			Name:  "active",
			Usage: "webhook is active",
		},
		&cli.BoolFlag{
			Name:  "inactive",
			Usage: "webhook is inactive",
		},
		&cli.StringFlag{
			Name:  "branch-filter",
			Usage: "branch filter for push events",
		},
		&cli.StringFlag{
			Name:  "authorization-header",
			Usage: "authorization header",
		},
	}, flags.AllDefaultFlags...),
}

CmdWebhooksUpdate represents a sub command of webhooks to update webhook

Functions

func RunWebhooksList

func RunWebhooksList(ctx stdctx.Context, cmd *cli.Command) error

RunWebhooksList list webhooks

Types

This section is empty.

Jump to

Keyboard shortcuts

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