Versions in this module Expand all Collapse all v0 v0.10.0 Jan 2, 2025 Changes in this version type Forge + func (*Forge) MarshalChangeID(id forge.ChangeID) (json.RawMessage, error) + func (*Forge) UnmarshalChangeID(data json.RawMessage) (forge.ChangeID, error) v0.9.0 Nov 26, 2024 Changes in this version + const DefaultURL + type AuthType int + const AuthTypeEnvironmentVariable + const AuthTypeGitLabCLI + const AuthTypeOAuth2 + const AuthTypePAT + func (a *AuthType) UnmarshalText(b []byte) error + func (a AuthType) MarshalText() ([]byte, error) + func (a AuthType) String() string + type AuthenticationToken struct + AccessToken string + AuthType AuthType + Hostname string + type CLIAuthenticator struct + CLI gitlabCLI + Hostname string + func (a *CLIAuthenticator) Authenticate(ctx context.Context, _ ui.View) (*AuthenticationToken, error) + type DeviceFlowAuthenticator struct + ClientID string + Endpoint oauth2.Endpoint + Scopes []string + func (a *DeviceFlowAuthenticator) Authenticate(ctx context.Context, view ui.View) (*AuthenticationToken, error) + type Forge struct + Log *log.Logger + Options Options + func (*Forge) ID() string + func (*Forge) MarshalChangeMetadata(md forge.ChangeMetadata) (json.RawMessage, error) + func (*Forge) UnmarshalChangeMetadata(data json.RawMessage) (forge.ChangeMetadata, error) + func (f *Forge) AuthenticationFlow(ctx context.Context, view ui.View) (forge.AuthenticationToken, error) + func (f *Forge) CLIPlugin() any + func (f *Forge) ChangeTemplatePaths() []string + func (f *Forge) ClearAuthenticationToken(stash secret.Stash) error + func (f *Forge) LoadAuthenticationToken(stash secret.Stash) (forge.AuthenticationToken, error) + func (f *Forge) MatchURL(remoteURL string) bool + func (f *Forge) OpenURL(ctx context.Context, token forge.AuthenticationToken, remoteURL string) (forge.Repository, error) + func (f *Forge) SaveAuthenticationToken(stash secret.Stash, t forge.AuthenticationToken) error + func (f *Forge) URL() string + type MR struct + Number int + func (id *MR) String() string + func (id *MR) UnmarshalJSON(data []byte) error + type MRComment struct + MRNumber int + Number int + func (c *MRComment) String() string + type MRMetadata struct + MR *MR + NavigationComment *MRComment + func (*MRMetadata) ForgeID() string + func (m *MRMetadata) ChangeID() forge.ChangeID + func (m *MRMetadata) NavigationCommentID() forge.ChangeCommentID + func (m *MRMetadata) SetNavigationCommentID(id forge.ChangeCommentID) + type Options struct + ClientID string + Token string + URL string + type PATAuthenticator struct + func (a *PATAuthenticator) Authenticate(ctx context.Context, view ui.View) (*AuthenticationToken, error) + type Repository struct + func (r *Repository) ChangesAreMerged(ctx context.Context, ids []forge.ChangeID) ([]bool, error) + func (r *Repository) DeleteChangeComment(ctx context.Context, id forge.ChangeCommentID) error + func (r *Repository) EditChange(ctx context.Context, id forge.ChangeID, opts forge.EditChangeOptions) error + func (r *Repository) FindChangeByID(ctx context.Context, id forge.ChangeID) (*forge.FindChangeItem, error) + func (r *Repository) FindChangesByBranch(ctx context.Context, branch string, opts forge.FindChangesOptions) ([]*forge.FindChangeItem, error) + func (r *Repository) Forge() forge.Forge + func (r *Repository) ListChangeComments(ctx context.Context, id forge.ChangeID, ...) iter.Seq2[*forge.ListChangeCommentItem, error] + func (r *Repository) ListChangeTemplates(ctx context.Context) ([]*forge.ChangeTemplate, error) + func (r *Repository) NewChangeMetadata(_ context.Context, id forge.ChangeID) (forge.ChangeMetadata, error) + func (r *Repository) PostChangeComment(ctx context.Context, id forge.ChangeID, markdown string) (forge.ChangeCommentID, error) + func (r *Repository) SubmitChange(ctx context.Context, req forge.SubmitChangeRequest) (forge.SubmitChangeResult, error) + func (r *Repository) UpdateChangeComment(ctx context.Context, id forge.ChangeCommentID, markdown string) error