gitea

package
v0.0.0-...-52ee643 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gitea provides a Gitea/Codeberg platform implementation for fetching pull request data from Gitea-based forges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Platform)

Option configures a Platform.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL sets a custom base URL for self-hosted Gitea instances.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets a custom HTTP client for the Gitea platform.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger sets a custom logger for the Gitea platform.

type Platform

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

Platform implements the prx.Platform interface for Gitea-based forges (Codeberg, self-hosted Gitea).

func NewCodebergPlatform

func NewCodebergPlatform(token string, opts ...Option) *Platform

NewCodebergPlatform creates a new Codeberg platform client.

func NewPlatform

func NewPlatform(token string, opts ...Option) *Platform

NewPlatform creates a new Gitea platform client. For Codeberg, use NewCodebergPlatform instead.

func (*Platform) FetchPR

func (p *Platform) FetchPR(ctx context.Context, owner, repo string, number int, refTime time.Time) (*prx.PullRequestData, error)

FetchPR retrieves a pull request with all events and metadata.

func (*Platform) Name

func (p *Platform) Name() string

Name returns the platform identifier.

Jump to

Keyboard shortcuts

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