remote

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL  = 0
	GITHUB = 1
)

Variables

This section is empty.

Functions

func ProviderTypeToString

func ProviderTypeToString(providerType int) string

Types

type Provider

type Provider interface {
	CreateDraftPR(path string, input types.PullRequestInput) error
	CreateIssue(issue types.Issue) (int, error)
	CreateIssueComment(path string, issueNumber int, comment types.Comment) error
	CreatePRComment(path string, prNumber int, comment types.Comment) error
	DeleteIssue(repoPath string, issueNumber int) error
	DeletePullRequest(repoPath string, prNumber int) error
	UpdateIssueState(issueNumber int, state string) error
	AddLabelToIssue(issueNumber int, label string) error
	FetchRepositories() ([]types.Repository, error)
	FetchIssues(remotePath string, options types.IssueFilterOptions) ([]types.Issue, error)
	FetchPullRequests(remotePath, label string) ([]types.PullRequest, error)
	UpdatePullRequestState(remotePath string, prNumber int, state string) error
	FetchDiffs(owner, repo string, resourceID int) (string, error)
	FetchComments(owner, repo string, prNumber int) ([]*types.Comment, error)
	AddCommentReaction(repoPath, reaction string, commentID int64) error
}

func New

func New(options ProviderOptions) Provider

type ProviderOptions

type ProviderOptions struct {
	Type        int
	GitHubToken string
	Path        string
}

func SettingsToOptions

func SettingsToOptions(settings ProviderSettings) (ProviderOptions, error)

type ProviderSettings

type ProviderSettings struct {
	Provider string `json:"provider,omitempty"`
	Path     string `json:"path,omitempty"`
	Token    string `json:"token,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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