Documentation
¶
Index ¶
- func AddAllRepoTagsToSyncQueue(ctx context.Context) error
- func ArchiveRelease(ctx context.Context, rel *repo_model.Release) error
- func CreateNewTag(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, ...) error
- func CreateRelease(gitRepo *git.Repository, rel *repo_model.Release, attachmentUUIDs []string, ...) error
- func DeleteReleaseByID(ctx context.Context, repo *repo_model.Repository, rel *repo_model.Release, ...) error
- func GenerateReleaseNotes(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, ...) (string, error)
- func Init() error
- func IsErrInvalidTagName(err error) bool
- func IsErrProtectedTagName(err error) bool
- func IsErrTagAlreadyExists(err error) bool
- func UnarchiveRelease(ctx context.Context, rel *repo_model.Release) error
- func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, ...) error
- type ErrInvalidTagName
- type ErrProtectedTagName
- type ErrTagAlreadyExists
- type GenerateReleaseNotesOptions
- type TagSyncOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveRelease ¶
func ArchiveRelease(ctx context.Context, rel *repo_model.Release) error
ArchiveRelease archives a release by setting IsArchived to true
func CreateNewTag ¶
func CreateNewTag(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, commit, tagName, msg string) error
CreateNewTag creates a new repository tag
func CreateRelease ¶
func CreateRelease(gitRepo *git.Repository, rel *repo_model.Release, attachmentUUIDs []string, msg string) error
CreateRelease creates a new release of repository.
func DeleteReleaseByID ¶
func DeleteReleaseByID(ctx context.Context, repo *repo_model.Repository, rel *repo_model.Release, doer *user_model.User, delTag bool) error
DeleteReleaseByID deletes a release and corresponding Git tag by given ID.
func GenerateReleaseNotes ¶
func GenerateReleaseNotes(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, opts GenerateReleaseNotesOptions) (string, error)
GenerateReleaseNotes builds the markdown snippet for release notes.
func IsErrInvalidTagName ¶
IsErrInvalidTagName checks if an error is a ErrInvalidTagName.
func IsErrProtectedTagName ¶
IsErrProtectedTagName checks if an error is a ErrProtectedTagName.
func IsErrTagAlreadyExists ¶
IsErrTagAlreadyExists checks if an error is an ErrTagAlreadyExists.
func UnarchiveRelease ¶
func UnarchiveRelease(ctx context.Context, rel *repo_model.Release) error
UnarchiveRelease unarchives a release by setting IsArchived to false
func UpdateRelease ¶
func UpdateRelease(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, rel *repo_model.Release, addAttachmentUUIDs, delAttachmentUUIDs []string, editAttachments map[string]string, ) error
UpdateRelease updates information, attachments of a release and will create tag if it's not a draft and tag not exist. addAttachmentUUIDs accept a slice of new created attachments' uuids which will be reassigned release_id as the created release delAttachmentUUIDs accept a slice of attachments' uuids which will be deleted from the release editAttachments accept a map of attachment uuid to new attachment name which will be updated with attachments.
Types ¶
type ErrInvalidTagName ¶
type ErrInvalidTagName struct {
TagName string
}
ErrInvalidTagName represents a "InvalidTagName" kind of error.
func (ErrInvalidTagName) Error ¶
func (err ErrInvalidTagName) Error() string
func (ErrInvalidTagName) Unwrap ¶
func (err ErrInvalidTagName) Unwrap() error
type ErrProtectedTagName ¶
type ErrProtectedTagName struct {
TagName string
}
ErrProtectedTagName represents a "ProtectedTagName" kind of error.
func (ErrProtectedTagName) Error ¶
func (err ErrProtectedTagName) Error() string
func (ErrProtectedTagName) Unwrap ¶
func (err ErrProtectedTagName) Unwrap() error
type ErrTagAlreadyExists ¶
type ErrTagAlreadyExists struct {
TagName string
}
ErrTagAlreadyExists represents an error that tag with such name already exists.
func (ErrTagAlreadyExists) Error ¶
func (err ErrTagAlreadyExists) Error() string
func (ErrTagAlreadyExists) Unwrap ¶
func (err ErrTagAlreadyExists) Unwrap() error
type GenerateReleaseNotesOptions ¶
GenerateReleaseNotesOptions describes how to build release notes content.
Source Files
¶
- notes.go
- release.go
- tag.go