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 ¶
- func New(client forge.Client) scm.Driver
- type Driver
- func (d *Driver) AddComment(context.Context, string, string, int, string) (*forge.IssueComment, error)
- func (d *Driver) AddIssueLabels(context.Context, string, string, int, ...string) error
- func (d *Driver) CloseIssue(context.Context, string, string, int) error
- func (d *Driver) CommitFile(context.Context, string, string, string, string, []byte) error
- func (d *Driver) CommitFileToBranch(context.Context, string, string, string, string, string, []byte) error
- func (d *Driver) CommitFileToFork(context.Context, string, string, string, string, string, []byte) error
- func (d *Driver) CreateBranch(context.Context, string, string, string) error
- func (d *Driver) CreateChangeProposal(context.Context, string, string, string, string, string, string) (*forge.ChangeProposal, error)
- func (d *Driver) CreateFork(context.Context, string, string, string) (string, error)
- func (d *Driver) CreateForkChangeProposal(context.Context, string, string, string, string, string, string, string, ...) (*forge.ChangeProposal, error)
- func (d *Driver) CreateIssue(context.Context, string, string, string, string, ...string) (*forge.Issue, error)
- func (d *Driver) CreateRepo(context.Context, string, string, string) error
- func (d *Driver) CreateUserFork(context.Context, string, string) (string, string, error)
- func (d *Driver) DeleteBranch(context.Context, string, string, string) error
- func (d *Driver) DeleteRepo(context.Context, string, string) error
- func (d *Driver) EnsureLabel(context.Context, string, string, string) error
- func (d *Driver) EnsureRepoPublic(context.Context, string, string) error
- func (d *Driver) GetBranchRef(context.Context, string, string, string) (string, error)
- func (d *Driver) GetDefaultBranch(context.Context, string, string) (string, error)
- func (d *Driver) GetFileContent(context.Context, string, string, string) ([]byte, error)
- func (d *Driver) GetFileContentAtRef(context.Context, string, string, string, string) ([]byte, error)
- func (d *Driver) GetIssue(context.Context, string, string, int) (*forge.Issue, error)
- func (d *Driver) ListComments(context.Context, string, string, int) ([]forge.IssueComment, error)
- func (d *Driver) ListIssueReactions(context.Context, string, string, int) ([]forge.Reaction, error)
- func (d *Driver) ListOpenChangeProposals(context.Context, string, string) ([]forge.ChangeProposal, error)
- func (d *Driver) ListOpenIssues(context.Context, string, string, ...string) ([]forge.Issue, error)
- func (d *Driver) ListPullRequestCommits(context.Context, string, string, int) ([]string, error)
- func (d *Driver) ListPullRequestReviews(context.Context, string, string, int) ([]forge.PullRequestReview, error)
- func (d *Driver) SubmitPullRequestReview(context.Context, string, string, int, string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*Driver) CommitFile ¶
func (*Driver) CommitFileToBranch ¶
func (*Driver) CommitFileToFork ¶
func (*Driver) CreateBranch ¶
func (*Driver) CreateChangeProposal ¶
func (*Driver) CreateFork ¶
func (*Driver) CreateForkChangeProposal ¶
func (*Driver) CreateIssue ¶
func (*Driver) CreateRepo ¶
func (*Driver) CreateUserFork ¶
func (*Driver) DeleteBranch ¶
func (*Driver) EnsureLabel ¶
func (*Driver) EnsureRepoPublic ¶
func (*Driver) GetBranchRef ¶
func (*Driver) GetDefaultBranch ¶
func (*Driver) GetFileContent ¶
func (*Driver) GetFileContentAtRef ¶
func (*Driver) ListComments ¶
func (*Driver) ListIssueReactions ¶
func (*Driver) ListOpenChangeProposals ¶
func (*Driver) ListOpenIssues ¶
func (*Driver) ListPullRequestCommits ¶
func (*Driver) ListPullRequestReviews ¶
Click to show internal directories.
Click to hide internal directories.