shared

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IssueStateFromString

func IssueStateFromString(state string) string

IssueStateFromString converts a string state to the Bitbucket API state format

func ParseIssueArg

func ParseIssueArg(arg string) (int, bbrepo.Interface, error)

ParseIssueArg parses an issue argument which can be a number or URL

Types

type Content

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

type Issue

type Issue struct {
	ID        int      `json:"id"`
	Title     string   `json:"title"`
	Content   *Content `json:"content,omitempty"`
	State     string   `json:"state"`    // new, open, resolved, on hold, invalid, duplicate, wontfix, closed
	Priority  string   `json:"priority"` // trivial, minor, major, critical, blocker
	Kind      string   `json:"kind"`     // bug, enhancement, proposal, task
	Reporter  User     `json:"reporter"`
	Assignee  *User    `json:"assignee,omitempty"`
	CreatedOn string   `json:"created_on"`
	UpdatedOn string   `json:"updated_on"`
	Links     Links    `json:"links"`
	Votes     int      `json:"votes"`
	Watches   int      `json:"watches"`
}

Issue represents a Bitbucket issue

func (*Issue) Body

func (i *Issue) Body() string

Body returns the issue content

func (*Issue) HTMLURL

func (i *Issue) HTMLURL() string

HTMLURL returns the web URL for the issue

func (*Issue) KindDisplay

func (i *Issue) KindDisplay() string

KindDisplay returns a human-readable kind

func (*Issue) PriorityDisplay

func (i *Issue) PriorityDisplay() string

PriorityDisplay returns a human-readable priority

func (*Issue) StateDisplay

func (i *Issue) StateDisplay() string

StateDisplay returns a human-readable state

type IssueList

type IssueList struct {
	Size     int     `json:"size"`
	Page     int     `json:"page"`
	PageLen  int     `json:"pagelen"`
	Next     string  `json:"next"`
	Previous string  `json:"previous"`
	Values   []Issue `json:"values"`
}

IssueList represents a paginated list of issues

type Links struct {
	HTML struct {
		Href string `json:"href"`
	} `json:"html"`
	Self struct {
		Href string `json:"href"`
	} `json:"self"`
	Avatar struct {
		Href string `json:"href"`
	} `json:"avatar"`
}

type User

type User struct {
	DisplayName string `json:"display_name"`
	UUID        string `json:"uuid"`
	AccountID   string `json:"account_id"`
	Nickname    string `json:"nickname"`
	Links       Links  `json:"links"`
}

Jump to

Keyboard shortcuts

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