forgejo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForgejoClient

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

ForgejoClient implements the ClientInterface using the Forgejo SDK

func NewForgejoClient

func NewForgejoClient(url, token string) (*ForgejoClient, error)

NewForgejoClient creates a new Forgejo client

func NewForgejoClientWithHTTPClient

func NewForgejoClientWithHTTPClient(url, token string, httpClient *http.Client) (*ForgejoClient, error)

NewForgejoClientWithHTTPClient creates a new Forgejo client with a custom HTTP client

func (*ForgejoClient) CreateIssue

func (c *ForgejoClient) CreateIssue(ctx context.Context, args remote.CreateIssueArgs) (*remote.Issue, error)

CreateIssue creates a new issue in the specified repository

func (*ForgejoClient) CreateIssueComment

func (c *ForgejoClient) CreateIssueComment(ctx context.Context, repo string, issueNumber int, comment string) (*remote.Comment, error)

CreateIssueComment creates a comment on an issue

func (*ForgejoClient) CreateIssueWithAttachments

func (c *ForgejoClient) CreateIssueWithAttachments(ctx context.Context, args remote.CreateIssueWithAttachmentsArgs) (*remote.Issue, error)

CreateIssueWithAttachments creates a new issue with attachments Note: Attachment upload is not yet implemented as Forgejo/Gitea SDKs don't expose issue attachment APIs. This method currently only creates the issue.

func (*ForgejoClient) CreatePullRequest

func (c *ForgejoClient) CreatePullRequest(ctx context.Context, args remote.CreatePullRequestArgs) (*remote.PullRequest, error)

CreatePullRequest creates a new pull request in the repository

func (*ForgejoClient) CreatePullRequestComment

func (c *ForgejoClient) CreatePullRequestComment(ctx context.Context, repo string, pullRequestNumber int, comment string) (*remote.Comment, error)

CreatePullRequestComment creates a comment on a pull request

func (*ForgejoClient) EditIssue

func (c *ForgejoClient) EditIssue(ctx context.Context, args remote.EditIssueArgs) (*remote.Issue, error)

EditIssue edits an existing issue in the specified repository

func (*ForgejoClient) EditIssueComment

func (c *ForgejoClient) EditIssueComment(ctx context.Context, args remote.EditIssueCommentArgs) (*remote.Comment, error)

EditIssueComment edits an existing issue comment

func (*ForgejoClient) EditPullRequest

func (c *ForgejoClient) EditPullRequest(ctx context.Context, args remote.EditPullRequestArgs) (*remote.PullRequest, error)

EditPullRequest edits an existing pull request

func (*ForgejoClient) EditPullRequestComment

func (c *ForgejoClient) EditPullRequestComment(ctx context.Context, args remote.EditPullRequestCommentArgs) (*remote.Comment, error)

EditPullRequestComment edits an existing pull request comment

func (*ForgejoClient) GetFileContent

func (c *ForgejoClient) GetFileContent(ctx context.Context, owner, repo, ref, filepath string) ([]byte, error)

GetFileContent fetches file content from repository

func (*ForgejoClient) GetPullRequest added in v0.1.1

func (c *ForgejoClient) GetPullRequest(ctx context.Context, repo string, number int) (*remote.PullRequestDetails, error)

GetPullRequest fetches a single pull request with full metadata

func (*ForgejoClient) ListIssueComments

func (c *ForgejoClient) ListIssueComments(ctx context.Context, repo string, issueNumber int, limit, offset int) (*remote.IssueCommentList, error)

ListIssueComments lists comments on an issue

func (*ForgejoClient) ListIssues

func (c *ForgejoClient) ListIssues(ctx context.Context, repo string, limit, offset int) ([]remote.Issue, error)

ListIssues retrieves issues from the specified repository

func (*ForgejoClient) ListPullRequestComments

func (c *ForgejoClient) ListPullRequestComments(ctx context.Context, repo string, pullRequestNumber int, limit, offset int) (*remote.PullRequestCommentList, error)

ListPullRequestComments lists comments on a pull request

func (*ForgejoClient) ListPullRequests

func (c *ForgejoClient) ListPullRequests(ctx context.Context, repo string, options remote.ListPullRequestsOptions) ([]remote.PullRequest, error)

ListPullRequests lists pull requests from a repository

Jump to

Keyboard shortcuts

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