discussion

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIssueDoesNotExist = errors.New("discussion with the given iid does not exist")

ErrIssueDoesNotExist is returned if the requested discussion does not exist.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Author       remote.User
	Body         string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	LastEditedBy remote.User
	Comments     []Comment
	Resolved     bool
}

Comment contains the comments on an issue. Comments has a max depth of one.

type Details

type Details struct {
	Title       string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Author      remote.User
	BaseURL     url.URL
	Assignees   []remote.User
	Labels      []Label
	Discussion  []Comment
}

Details contains the discussion of an issue.

func QueryGitHub

func QueryGitHub(match *match.Match, projectPath string, issueID string) (*Details, error)

QueryGitHub returns the discussion associated with the passed issueID. If the requested issue does not exist, an ErrIssueDoesNotExist is returned.

func QueryGitLab

func QueryGitLab(match *match.Match, projectPath string, issueID string) (*Details, error)

QueryGitLab returns the discussion associated with the passed issueID. If the requested issue does not exist, an ErrIssueDoesNotExist is returned.

func (*Details) UpdateUsername

func (id *Details) UpdateUsername(ownUsername string)

UpdateUsername replaces the username of the user with "you".

type Label

type Label struct {
	Title string
	Color string
}

Label contains the title and color of a GitLab/GitHub label.

Jump to

Keyboard shortcuts

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