bitbucket

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Signals = []string{
	"bitbucket.events.pullrequest.created",
	"bitbucket.events.pullrequest.updated",
	"bitbucket.events.pullrequest.approved",
	"bitbucket.events.pullrequest.unapproved",
	"bitbucket.events.pullrequest.changes_request_created",
	"bitbucket.events.pullrequest.changes_request_removed",
	"bitbucket.events.pullrequest.fulfilled",
	"bitbucket.events.pullrequest.rejected",

	"bitbucket.events.pullrequest.comment_created",
	"bitbucket.events.pullrequest.comment_updated",
	"bitbucket.events.pullrequest.comment_deleted",
	"bitbucket.events.pullrequest.comment_resolved",
	"bitbucket.events.pullrequest.comment_reopened",

	"bitbucket.events.repo.commit_comment_created",

	"bitbucket.events.repo.build_status_created",
	"bitbucket.events.repo.build_status_updated",
}

Signals enumerates all the Timpani signals that this package can handle.

Functions

func RegisterWorkflows

func RegisterWorkflows(w worker.Worker, cmd *cli.Command)

Types

type Account

type Account struct {
	Type string `json:"type"`

	DisplayName string `json:"display_name"`
	Nickname    string `json:"nickname"`
	AccountID   string `json:"account_id"`
	UUID        string `json:"uuid"`

	Links map[string]Link `json:"links"`
}

type Bitbucket

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

type Branch

type Branch struct {
	Name string `json:"name"`

	Links          map[string]Link `json:"links"`
	SyncStrategies []string        `json:"sync_strategies"`
}

type Comment

type Comment struct {
	ID     int     `json:"id"`
	Parent *Parent `json:"parent,omitempty"`

	CreatedOn string `json:"created_on"`
	UpdatedOn string `json:"updated_on"`
	Deleted   bool   `json:"deleted"`
	Pending   bool   `json:"pending"`

	Content Rendered `json:"content"`
	Inline  *Inline  `json:"inline"`
	User    Account  `json:"user"`

	Links map[string]Link `json:"links"`
}

type Commit

type Commit struct {
	Hash  string          `json:"hash"`
	Links map[string]Link `json:"links"`
}

type Inline

type Inline struct {
	From         *int   `json:"from"`
	To           *int   `json:"to"`
	Path         string `json:"path"`
	Outdated     bool   `json:"outdated"`
	ContextLines string `json:"context_lines"`
	SrcRev       string `json:"src_rev"`
	DestRev      string `json:"dest_rev"`
}
type Link struct {
	HRef string `json:"href"`
}

type Parent

type Parent struct {
	ID    int             `json:"id"`
	Links map[string]Link `json:"links"`
}

type Participant

type Participant struct {
	User           Account `json:"user"`
	Role           string  `json:"role"` // "PARTICIPANT" / "REVIEWER".
	Approved       bool    `json:"approved"`
	State          *string `json:"state"` // Nil / "changes_requested" / "approved".
	ParticipatedOn *string `json:"participated_on"`
}

type Project

type Project struct {
	Key  string `json:"key"`
	Name string `json:"name"`
	UUID string `json:"uuid"`

	Links map[string]Link `json:"links"`
}

type PullRequest

type PullRequest struct {
	ID          int    `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	State       string `json:"state"` // "OPEN", "MERGED", "DECLINED".
	Draft       bool   `json:"draft"`

	Summary     Rendered            `json:"summary"`
	Rendered    map[string]Rendered `json:"rendered"`
	Source      Reference           `json:"source"`
	Destination Reference           `json:"destination"`

	CreatedOn    string `json:"created_on"`
	UpdatedOn    string `json:"updated_on"`
	CommentCount int    `json:"comment_count"`
	TaskCount    int    `json:"task_count"`

	Author       Account       `json:"author"`
	Participants []Participant `json:"participants"`
	Reviewers    []Account     `json:"reviewers"`
	ClosedBy     *Account      `json:"closed_by"`
	Reason       string        `json:"reason"`

	CloseSourceBranch bool    `json:"close_source_branch"`
	MergeCommit       *Commit `json:"merge_commit"`

	Links map[string]Link `json:"links"`
}

type PullRequestEvent

type PullRequestEvent struct {
	Type string `json:"type"` // Defined and used internally by us.

	PullRequest PullRequest `json:"pullrequest"`
	Repository  Repository  `json:"repository"`
	Actor       Account     `json:"actor"`

	Approval       *Review  `json:"approval,omitempty"`
	ChangesRequest *Review  `json:"changes_request,omitempty"`
	Comment        *Comment `json:"comment,omitempty"`
}

https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Pull-request-events https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Common-entities-for-event-payloads

type Reference

type Reference struct {
	Branch     Branch     `json:"branch"`
	Commit     Commit     `json:"commit"`
	Repository Repository `json:"repository"`
}

type Rendered

type Rendered struct {
	Raw    string `json:"raw"`
	Markup string `json:"markup"`
	HTML   string `json:"html"`
}

type Repository

type Repository struct {
	FullName string `json:"full_name"`
	Name     string `json:"name"`
	UUID     string `json:"uuid"`

	SCM       string  `json:"scm"`
	IsPrivate bool    `json:"is_private"`
	Website   *string `json:"website"`

	Workspace Workspace `json:"workspace"`
	Project   Project   `json:"project"`
	Owner     Account   `json:"owner"`

	Links map[string]Link `json:"links"`
}

type RepositoryEvent

type RepositoryEvent struct {
	Type string `json:"type"` // Defined and used internally by us.

	Repository Repository `json:"repository"`
	Actor      Account    `json:"actor"`

	Commit  *Commit  `json:"commit,omitempty"`
	Comment *Comment `json:"comment,omitempty"`
}

https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Repository-events

type Review

type Review struct {
	Date string  `json:"date"`
	User Account `json:"user"`
}

type Workspace

type Workspace struct {
	Slug string `json:"slug"`
	Name string `json:"name"`
	UUID string `json:"uuid"`

	Links map[string]Link `json:"links"`
}

Jump to

Keyboard shortcuts

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