services

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubIssue

type GithubIssue struct {
	Number int
	Title  string
	Labels []string
}

GithubIssue represents a GitHub issue

type GithubProject

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

GithubProject represents a GitHub repository

func NewGithubProject

func NewGithubProject(repoName string) (*GithubProject, error)

NewGithubProject creates a new GitHub project client

func (*GithubProject) CreateIssue

func (p *GithubProject) CreateIssue(title, labels string, selfAssign bool, milestoneTitle ...string) (*GithubIssue, error)

CreateIssue creates a new issue in the repository

func (*GithubProject) CreatePullRequest

func (p *GithubProject) CreatePullRequest(title, sourceBranch, targetBranch string, issueNumber int, isDraft bool, issueLabels []string) (*GithubPullRequest, error)

CreatePullRequest creates a new pull request in the repository

func (*GithubProject) GetIssue

func (p *GithubProject) GetIssue(issueNumber int) (*GithubIssue, error)

GetIssue returns an issue by its number

func (*GithubProject) GetOpenPullRequestsForIssue

func (p *GithubProject) GetOpenPullRequestsForIssue(issueNumber int) ([]*GithubPullRequest, error)

GetOpenPullRequestsForIssue returns all open pull requests related to an issue

type GithubPullRequest

type GithubPullRequest struct {
	Number  int
	Title   string
	HTMLURL string
	IsDraft bool
}

GithubPullRequest represents a GitHub pull request

type GitlabIssue

type GitlabIssue struct {
	IID         int
	Title       string
	Labels      []string
	MilestoneID int
}

GitlabIssue represents a GitLab issue

type GitlabMergeRequest

type GitlabMergeRequest struct {
	IID     int
	Title   string
	WebURL  string
	IsDraft bool
}

GitlabMergeRequest represents a GitLab merge request

type GitlabProject

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

GitlabProject represents a GitLab repository

func NewGitlabProject

func NewGitlabProject(repoName string) (*GitlabProject, error)

NewGitlabProject creates a new GitLab project client

func (*GitlabProject) CreateIssue

func (p *GitlabProject) CreateIssue(title, labels string, selfAssign bool, milestoneTitle ...string) (*GitlabIssue, error)

CreateIssue creates a new issue in the repository

func (*GitlabProject) CreateMergeRequest

func (p *GitlabProject) CreateMergeRequest(title, sourceBranch, targetBranch string, issueIID int, isDraft bool, issueLabels []string, milestoneid int) (*GitlabMergeRequest, error)

CreateMergeRequest creates a new merge request in the repository

func (*GitlabProject) GetIssue

func (p *GitlabProject) GetIssue(issueNumber int) (*GitlabIssue, error)

GetIssue returns an issue by its number

func (*GitlabProject) GetMilestoneID

func (p *GitlabProject) GetMilestoneID(title string) (int, error)

GetMilestoneID returns the ID of a milestone by title

func (*GitlabProject) GetOpenMergeRequestsForIssue

func (p *GitlabProject) GetOpenMergeRequestsForIssue(issueID int) ([]*GitlabMergeRequest, error)

GetOpenMergeRequestsForIssue returns all open merge requests related to an issue

Jump to

Keyboard shortcuts

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