forgejo

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package forgejo is the Forgejo scm.Driver for behaviour tests.

It is a minimal stub: every operation returns an error that satisfies errors.Is(err, drivers.ErrNotImplemented) and names the operation. It never delegates to the GitHub or GitLab drivers. Real Forgejo operations land with the Forgejo forge adapter (see #9642).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client forge.Client) scm.Driver

New returns the Forgejo SCM driver.

Types

type Driver

type Driver struct {
	// Client is the forge client the driver was built with. The stub
	// does not use it.
	Client forge.Client
}

Driver implements scm.Driver for Forgejo. It is immutable and holds no state, so it is safe for concurrent use.

func (*Driver) AddComment

func (*Driver) AddIssueLabels

func (d *Driver) AddIssueLabels(context.Context, string, string, int, ...string) error

func (*Driver) CloseIssue

func (d *Driver) CloseIssue(context.Context, string, string, int) error

func (*Driver) CommitFile

func (d *Driver) CommitFile(context.Context, string, string, string, string, []byte) error

func (*Driver) CommitFileToBranch

func (d *Driver) CommitFileToBranch(context.Context, string, string, string, string, string, []byte) error

func (*Driver) CommitFileToFork

func (d *Driver) CommitFileToFork(context.Context, string, string, string, string, string, []byte) error

func (*Driver) CreateBranch

func (d *Driver) CreateBranch(context.Context, string, string, string) error

func (*Driver) CreateChangeProposal

func (d *Driver) CreateChangeProposal(context.Context, string, string, string, string, string, string) (*forge.ChangeProposal, error)

func (*Driver) CreateFork

func (d *Driver) CreateFork(context.Context, string, string, string) (string, error)

func (*Driver) CreateForkChangeProposal

func (d *Driver) CreateForkChangeProposal(context.Context, string, string, string, string, string, string, string, string) (*forge.ChangeProposal, error)

func (*Driver) CreateIssue

func (d *Driver) CreateIssue(context.Context, string, string, string, string, ...string) (*forge.Issue, error)

func (*Driver) CreateRepo

func (d *Driver) CreateRepo(context.Context, string, string, string) error

func (*Driver) CreateUserFork

func (d *Driver) CreateUserFork(context.Context, string, string) (string, string, error)

func (*Driver) DeleteBranch

func (d *Driver) DeleteBranch(context.Context, string, string, string) error

func (*Driver) DeleteRepo

func (d *Driver) DeleteRepo(context.Context, string, string) error

func (*Driver) EnsureLabel

func (d *Driver) EnsureLabel(context.Context, string, string, string) error

func (*Driver) EnsureRepoPublic

func (d *Driver) EnsureRepoPublic(context.Context, string, string) error

func (*Driver) GetBranchRef

func (d *Driver) GetBranchRef(context.Context, string, string, string) (string, error)

func (*Driver) GetDefaultBranch

func (d *Driver) GetDefaultBranch(context.Context, string, string) (string, error)

func (*Driver) GetFileContent

func (d *Driver) GetFileContent(context.Context, string, string, string) ([]byte, error)

func (*Driver) GetFileContentAtRef

func (d *Driver) GetFileContentAtRef(context.Context, string, string, string, string) ([]byte, error)

func (*Driver) GetIssue

func (d *Driver) GetIssue(context.Context, string, string, int) (*forge.Issue, error)

func (*Driver) ListComments

func (d *Driver) ListComments(context.Context, string, string, int) ([]forge.IssueComment, error)

func (*Driver) ListIssueReactions

func (d *Driver) ListIssueReactions(context.Context, string, string, int) ([]forge.Reaction, error)

func (*Driver) ListOpenChangeProposals

func (d *Driver) ListOpenChangeProposals(context.Context, string, string) ([]forge.ChangeProposal, error)

func (*Driver) ListOpenIssues

func (d *Driver) ListOpenIssues(context.Context, string, string, ...string) ([]forge.Issue, error)

func (*Driver) ListPullRequestCommits

func (d *Driver) ListPullRequestCommits(context.Context, string, string, int) ([]string, error)

func (*Driver) ListPullRequestReviews

func (d *Driver) ListPullRequestReviews(context.Context, string, string, int) ([]forge.PullRequestReview, error)

func (*Driver) SubmitPullRequestReview

func (d *Driver) SubmitPullRequestReview(context.Context, string, string, int, string) error

Jump to

Keyboard shortcuts

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