gitea

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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 GiteaClient

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

GiteaClient implements IssueLister using the Gitea SDK

func NewGiteaClient

func NewGiteaClient(url, token string) (*GiteaClient, error)

NewGiteaClient creates a new Gitea client

func NewGiteaClientWithHTTPClient

func NewGiteaClientWithHTTPClient(url, token string, httpClient *http.Client) (*GiteaClient, error)

NewGiteaClientWithHTTPClient creates a new Gitea client with a custom HTTP client

func (*GiteaClient) CreateIssue

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

CreateIssue creates a new issue in the specified repository

func (*GiteaClient) CreateIssueComment

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

CreateIssueComment creates a comment on the specified issue

func (*GiteaClient) CreateIssueWithAttachments

func (c *GiteaClient) 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 (*GiteaClient) CreatePullRequest

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

CreatePullRequest creates a new pull request in the repository

func (*GiteaClient) CreatePullRequestComment

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

CreatePullRequestComment creates a comment on the specified pull request

func (*GiteaClient) EditIssue

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

EditIssue edits an existing issue in the specified repository

func (*GiteaClient) EditIssueComment

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

EditIssueComment edits an existing comment on the specified issue

func (*GiteaClient) EditPullRequest

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

EditPullRequest edits an existing pull request

func (*GiteaClient) EditPullRequestComment

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

EditPullRequestComment edits an existing comment on the specified pull request

func (*GiteaClient) GetFileContent

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

GetFileContent fetches file content from repository

func (*GiteaClient) ListIssueComments

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

ListIssueComments retrieves comments from the specified issue

func (*GiteaClient) ListIssues

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

ListIssues retrieves issues from the specified repository

func (*GiteaClient) ListPullRequestComments

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

ListPullRequestComments retrieves comments from the specified pull request

func (*GiteaClient) ListPullRequests

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

ListPullRequests retrieves pull requests from the specified repository

Jump to

Keyboard shortcuts

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