Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + const EnvActionPerm + const EnvAppURL + const EnvDeployKeyID + const EnvIsInternal + const EnvKeyID + const EnvPRID + const EnvPusherEmail + const EnvPusherID + const EnvPusherName + const EnvRepoID + const EnvRepoIsWiki + const EnvRepoName + const EnvRepoUsername + var Gitignores []string + var LabelTemplateFiles []OptionFile + var Licenses []string + var Readmes []string + func AddCollaborator(ctx context.Context, repo *repo_model.Repository, u *user_model.User) error + func CanUserDelete(repo *repo_model.Repository, user *user_model.User) (bool, error) + func CanUserForkRepo(user *user_model.User, repo *repo_model.Repository) (bool, error) + func CheckDaemonExportOK(ctx context.Context, repo *repo_model.Repository) error + func CheckDelegateHooks(repoPath string) ([]string, error) + func CleanUpMigrateInfo(ctx context.Context, repo *repo_model.Repository) (*repo_model.Repository, error) + func CreateDelegateHooks(repoPath string) error + func CreateRepository(doer, u *user_model.User, opts CreateRepoOptions) (*repo_model.Repository, error) + func CreateRepositoryByExample(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository, ...) (err error) + func CreateTemporaryPath(prefix string) (string, error) + func FullPushingEnvironment(author, committer *user_model.User, repo *repo_model.Repository, ...) []string + func GenerateGitContent(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error + func GenerateRepository(ctx context.Context, doer, owner *user_model.User, ...) (_ *repo_model.Repository, err error) + func InitializeLabels(ctx context.Context, id int64, labelTemplate string, isOrg bool) error + func InternalPushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string + func LoadRepoConfig() error + func LoadTemplateLabelsByDisplayName(displayName string) ([]*label.Label, error) + func LocalCopyPath() string + func MigrateRepositoryGitData(ctx context.Context, u *user_model.User, repo *repo_model.Repository, ...) (*repo_model.Repository, error) + func PushUpdateAddTag(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, ...) error + func PushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string + func RemoveTemporaryPath(basePath string) error + func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, ...) error + func SyncReleasesWithTags(repo *repo_model.Repository, gitRepo *git.Repository) error + func UpdateRepoSize(ctx context.Context, repo *repo_model.Repository) error + func UpdateRepository(ctx context.Context, repo *repo_model.Repository, visibilityChanged bool) (err error) + func WikiRemoteURL(ctx context.Context, remote string) string + type CreateRepoOptions struct + AutoInit bool + DefaultBranch string + Description string + GitServiceType api.GitServiceType + Gitignores string + IsMirror bool + IsPrivate bool + IsTemplate bool + IssueLabels string + License string + MirrorInterval string + Name string + OriginalURL string + Readme string + Status repo_model.RepositoryStatus + TrustModel repo_model.TrustModelType + type GenerateRepoOptions struct + Avatar bool + DefaultBranch string + Description string + GitContent bool + GitHooks bool + IssueLabels bool + Name string + Private bool + Topics bool + Webhooks bool + func (gro GenerateRepoOptions) IsValid() bool + type GiteaTemplate struct + Content []byte + Path string + func (gt GiteaTemplate) Globs() []glob.Glob + type OptionFile struct + Description string + DisplayName string + type PushCommit struct + AuthorEmail string + AuthorName string + CommitterEmail string + CommitterName string + Message string + Sha1 string + Timestamp time.Time + func CommitToPushCommit(commit *git.Commit) *PushCommit + type PushCommits struct + Commits []*PushCommit + CompareURL string + HeadCommit *PushCommit + Len int + func GitToPushCommits(gitCommits []*git.Commit) *PushCommits + func NewPushCommits() *PushCommits + func (pc *PushCommits) AvatarLink(ctx context.Context, email string) string + func (pc *PushCommits) ToAPIPayloadCommits(ctx context.Context, repoPath, repoLink string) ([]*api.PayloadCommit, *api.PayloadCommit, error) + type PushUpdateOptions struct + NewCommitID string + OldCommitID string + PusherID int64 + PusherName string + RefFullName string + RepoName string + RepoUserName string + func (opts *PushUpdateOptions) BranchName() string + func (opts *PushUpdateOptions) IsBranch() bool + func (opts *PushUpdateOptions) IsDelBranch() bool + func (opts *PushUpdateOptions) IsDelRef() bool + func (opts *PushUpdateOptions) IsDelTag() bool + func (opts *PushUpdateOptions) IsNewBranch() bool + func (opts *PushUpdateOptions) IsNewRef() bool + func (opts *PushUpdateOptions) IsNewTag() bool + func (opts *PushUpdateOptions) IsTag() bool + func (opts *PushUpdateOptions) IsUpdateBranch() bool + func (opts *PushUpdateOptions) IsUpdateRef() bool + func (opts *PushUpdateOptions) RefName() string + func (opts *PushUpdateOptions) RepoFullName() string + func (opts *PushUpdateOptions) TagName() string