gitea

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID          = "gitea"
	EndpointKey = "endpoint"
	TokenKey    = "token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangesFromPayload added in v0.13.1

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

ChangesFromPayload represents the payload information of issue change

type ChangesPayload added in v0.13.1

type ChangesPayload struct {
	Title *ChangesFromPayload `json:"title,omitempty"`
	Body  *ChangesFromPayload `json:"body,omitempty"`
	Ref   *ChangesFromPayload `json:"ref,omitempty"`
}

ChangesPayload represents the payload information of issue change

type Gitea

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

func NewGitea

func NewGitea(endpoint, token string) (*Gitea, error)

func (*Gitea) GetRepositories

func (v *Gitea) GetRepositories(owner, reponame string) (*gitea.Repository, error)

type HookIssueAction added in v0.13.1

type HookIssueAction string

HookIssueAction represents the action that is sent along with an issue event.

const (
	// HookIssueOpened opened
	HookIssueOpened HookIssueAction = "opened"
	// HookIssueClosed closed
	HookIssueClosed HookIssueAction = "closed"
	// HookIssueReOpened reopened
	HookIssueReOpened HookIssueAction = "reopened"
	// HookIssueEdited edited
	HookIssueEdited HookIssueAction = "edited"
	// HookIssueAssigned assigned
	HookIssueAssigned HookIssueAction = "assigned"
	// HookIssueUnassigned unassigned
	HookIssueUnassigned HookIssueAction = "unassigned"
	// HookIssueLabelUpdated label_updated
	HookIssueLabelUpdated HookIssueAction = "label_updated"
	// HookIssueLabelCleared label_cleared
	HookIssueLabelCleared HookIssueAction = "label_cleared"
	// HookIssueSynchronized synchronized
	HookIssueSynchronized HookIssueAction = "synchronized"
	// HookIssueMilestoned is an issue action for when a milestone is set on an issue.
	HookIssueMilestoned HookIssueAction = "milestoned"
	// HookIssueDemilestoned is an issue action for when a milestone is cleared on an issue.
	HookIssueDemilestoned HookIssueAction = "demilestoned"
	// HookIssueReviewed is an issue action for when a pull request is reviewed
	HookIssueReviewed HookIssueAction = "reviewed"
	// HookIssueReviewRequested is an issue action for when a reviewer is requested for a pull request.
	HookIssueReviewRequested HookIssueAction = "review_requested"
	// HookIssueReviewRequestRemoved is an issue action for removing a review request to someone on a pull request.
	HookIssueReviewRequestRemoved HookIssueAction = "review_request_removed"
	// HookIssueCreated is an issue action for when an issue is created
	HookIssueCreated HookIssueAction = "created"
)

type IssuePayload added in v0.13.1

type IssuePayload struct {
	Action     HookIssueAction   `json:"action"`
	Index      int64             `json:"number"`
	Changes    *ChangesPayload   `json:"changes,omitempty"`
	Issue      *gitea.Issue      `json:"issue"`
	Repository *gitea.Repository `json:"repository"`
	Sender     *gitea.User       `json:"sender"`
	CommitID   string            `json:"commit_id"`
}

IssuePayload represents the payload information that is sent along with an issue event.

func (*IssuePayload) JSONPayload added in v0.13.1

func (p *IssuePayload) JSONPayload() ([]byte, error)

JSONPayload encodes the IssuePayload to JSON, with an indentation of two spaces.

Jump to

Keyboard shortcuts

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