forgejo

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package forgejo is a thin client for the pieces of the Forgejo API (Gitea-compatible) forge-dashboard needs — the same shape as internal/github, against a different API under a self-hosted host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client talks to a Forgejo instance's API as a single authenticated user.

func NewClient

func NewClient(instanceURL, token string) *Client

NewClient returns a Client authenticating as token against instanceURL (e.g. "https://git.higherlearning.eu"). baseURL in tests points straight at an httptest.Server instead.

func (*Client) ListOpenIssues

func (c *Client) ListOpenIssues(ctx context.Context, owner, name, repo string) ([]dashboard.Issue, error)

ListOpenIssues returns every open issue against repo. Forgejo's issues endpoint takes type=issues to exclude pull requests server-side, unlike GitHub's equivalent — no client-side filtering needed here.

func (*Client) ListOpenPullRequests

func (c *Client) ListOpenPullRequests(ctx context.Context, owner, name, repo string) ([]dashboard.PullRequest, error)

ListOpenPullRequests returns every open pull request against repo, with CI already resolved. repo is owner-qualified ("alrayyes/tempus-fugit").

func (*Client) ListRepos

func (c *Client) ListRepos(ctx context.Context) ([]dashboard.RepoRef, error)

ListRepos returns every repository the token can push to, across every page.

Jump to

Keyboard shortcuts

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