Documentation ¶
Index ¶
- Constants
- Variables
- func AccessLevel(user *user_model.User, repo *repo_model.Repository) (perm_model.AccessMode, error)
- func AccessLevelUnit(user *user_model.User, repo *repo_model.Repository, unitType unit.Type) (perm_model.AccessMode, error)
- func AccessTokenByNameExists(token *AccessToken) (bool, error)
- func AccessibleRepoIDsQuery(user *user_model.User) *builder.Builder
- func AddCollaborator(repo *repo_model.Repository, u *user_model.User) error
- func AddDeletePRBranchComment(doer *user_model.User, repo *repo_model.Repository, issueID int64, ...) error
- func AddDeletedBranch(repoID int64, branchName, commit string, deletedByID int64) error
- func AddOrgUser(orgID, uid int64) error
- func AddReleaseAttachments(ctx context.Context, releaseID int64, attachmentUUIDs []string) (err error)
- func AddTeamMember(team *Team, userID int64) error
- func BuildLabelNamesIssueIDsCondition(labelNames []string) *builder.Builder
- func CanBeAssigned(user *user_model.User, repo *repo_model.Repository, isPull bool) (bool, error)
- func CanCreateOrgRepo(orgID, uid int64) (bool, error)
- func CanMarkConversation(issue *Issue, doer *user_model.User) (permResult bool, err 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 CancelRepositoryTransfer(repo *repo_model.Repository) error
- func CancelStopwatch(user *user_model.User, issue *Issue) error
- func ChangeCollaborationAccessMode(repo *repo_model.Repository, uid int64, mode perm.AccessMode) error
- func ChangeMilestoneAssign(issue *Issue, doer *user_model.User, oldMilestoneID int64) (err error)
- func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error)
- func ChangeMilestoneStatusByRepoIDAndID(repoID, milestoneID int64, isClosed bool) error
- func ChangeOrgUserStatus(orgID, uid int64, public bool) error
- func ChangeProjectAssign(issue *Issue, doer *user_model.User, newProjectID int64) error
- func ChangeProjectStatus(p *Project, isClosed bool) error
- func ChangeProjectStatusByRepoIDAndID(repoID, projectID int64, isClosed bool) error
- func CheckDaemonExportOK(ctx context.Context, repo *repo_model.Repository) error
- func CheckIssueWatch(user *user_model.User, issue *Issue) (bool, error)
- func CheckLFSAccessForRepo(ownerID int64, repo *repo_model.Repository, mode perm.AccessMode) error
- func CheckRepoStats(ctx context.Context) error
- func CheckRepoUnitUser(repo *repo_model.Repository, user *user_model.User, unitType unit.Type) bool
- func CommentHashTag(id int64) string
- func CommentTypeIsRef(t CommentType) bool
- func CopyLFS(ctx context.Context, newRepo, oldRepo *repo_model.Repository) error
- func CountAccessTokens(opts ListAccessTokensOptions) (int64, error)
- func CountCollaborators(repoID int64) (int64, error)
- func CountCommentTypeLabelWithEmptyLabel() (int64, error)
- func CountCommentTypeLabelWithOutsideLabels() (int64, error)
- func CountComments(opts *FindCommentsOptions) (int64, error)
- func CountIssueLabelWithOutsideLabels() (int64, error)
- func CountIssueWatchers(issueID int64) (int64, error)
- func CountIssues(opts *IssuesOptions) (int64, error)
- func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error)
- func CountLFSLockByRepoID(repoID int64) (int64, error)
- func CountLFSMetaObjects(repoID int64) (int64, error)
- func CountLabelsByOrgID(orgID int64) (int64, error)
- func CountLabelsByRepoID(repoID int64) (int64, error)
- func CountMilestonesByRepoCond(repoCond builder.Cond, isClosed bool) (map[int64]int64, error)
- func CountMilestonesByRepoCondAndKw(repoCond builder.Cond, keyword string, isClosed bool) (map[int64]int64, error)
- func CountNotifications(opts *FindNotificationOptions) (int64, error)
- func CountNullArchivedRepository() (int64, error)
- func CountOrgMembers(opts *FindOrgMembersOpts) (int64, error)
- func CountOrganizations() int64
- func CountOrgs(opts FindOrgOptions) (int64, error)
- func CountOrphanedIssueLabels() (int64, error)
- func CountOrphanedIssues() (int64, error)
- func CountOrphanedLabels() (int64, error)
- func CountOrphanedObjects(subject, refobject, joinCond string) (int64, error)
- func CountReleasesByRepoID(repoID int64, opts FindReleasesOptions) (int64, error)
- func CountRepoClosedMilestones(repoID int64) (int64, error)
- func CountReviews(opts FindReviewOptions) (int64, error)
- func CountTrackedTimes(opts *FindTrackedTimesOptions) (int64, error)
- func CountUnread(user *user_model.User) int64
- func CountUserStopwatches(userID int64) (int64, error)
- func CountWrongUserType() (int64, error)
- func CreateIssueDependency(user *user_model.User, issue, dep *Issue) error
- func CreateIssueStopwatch(ctx context.Context, user *user_model.User, issue *Issue) error
- func CreateOrStopIssueStopwatch(user *user_model.User, issue *Issue) error
- func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error
- func CreateOrUpdateIssueWatch(userID, issueID int64, isWatching bool) error
- func CreateOrganization(org *Organization, owner *user_model.User) (err error)
- func CreatePendingRepositoryTransfer(doer, newOwner *user_model.User, repoID int64, teams []*Team) error
- func CreateRefComment(doer *user_model.User, repo *repo_model.Repository, issue *Issue, ...) error
- func CreateRepoTransferNotification(doer, newOwner *user_model.User, repo *repo_model.Repository) error
- func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository, ...) (err error)
- func CreateTask(task *Task) error
- func CreateTemporaryPath(prefix string) (string, error)
- func DecrementRepoForkNum(ctx context.Context, repoID int64) error
- func DeleteAccessTokenByID(id, userID int64) error
- func DeleteCollaboration(repo *repo_model.Repository, uid int64) (err error)
- func DeleteComment(comment *Comment) error
- func DeleteCommentReaction(doer *user_model.User, issue *Issue, comment *Comment, content string) error
- func DeleteDeployKey(ctx context.Context, doer *user_model.User, id int64) error
- func DeleteIssueLabel(issue *Issue, label *Label, doer *user_model.User) (err error)
- func DeleteIssueReaction(doer *user_model.User, issue *Issue, content string) error
- func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error
- func DeleteLabel(id, labelID int64) error
- func DeleteMilestoneByRepoID(repoID, id int64) error
- func DeleteOldActions(olderThan time.Duration) (err error)
- func DeleteOrganization(ctx context.Context, org *Organization) error
- func DeleteOrphanedIssueLabels() error
- func DeleteOrphanedIssues() error
- func DeleteOrphanedLabels() error
- func DeleteOrphanedObjects(subject, refobject, joinCond string) error
- func DeleteProjectBoardByID(boardID int64) error
- func DeleteProjectByID(id int64) error
- func DeleteProtectedBranch(repoID, id int64) (err error)
- func DeleteProtectedTag(pt *ProtectedTag) error
- func DeleteReaction(opts *ReactionOptions) error
- func DeleteReleaseByID(id int64) error
- func DeleteRepository(doer *user_model.User, uid, repoID int64) error
- func DeleteReview(r *Review) error
- func DeleteTeam(t *Team) error
- func DeleteTime(t *TrackedTime) error
- func DeleteUploadByUUID(uuid string) error
- func DeleteUploads(uploads ...*Upload) (err error)
- func DeleteUser(ctx context.Context, u *user_model.User) (err error)
- func DismissReview(review *Review, isDismiss bool) (err error)
- func DoctorUserStarNum() (err error)
- func FindOrgMembers(opts *FindOrgMembersOpts) (user_model.UserList, map[int64]bool, error)
- func FindRepoRecentCommitStatusContexts(repoID int64, before time.Duration) ([]string, error)
- func FindUserAccessibleRepoIDs(user *user_model.User) ([]int64, error)
- func FindUserOrgForks(repoID, userID int64) ([]*repo_model.Repository, error)
- func FinishIssueStopwatch(ctx context.Context, user *user_model.User, issue *Issue) error
- func FinishIssueStopwatchIfPossible(ctx context.Context, user *user_model.User, issue *Issue) error
- func FinishMigrateTask(task *Task) error
- func FixCommentTypeLabelWithEmptyLabel() (int64, error)
- func FixCommentTypeLabelWithOutsideLabels() (int64, error)
- func FixIssueLabelWithOutsideLabels() (int64, error)
- func FixNullArchivedRepository() (int64, error)
- func FixWrongUserType() (int64, error)
- func FullPushingEnvironment(author, committer *user_model.User, repo *repo_model.Repository, ...) []string
- func GenerateIssueLabels(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error
- func GenerateWebhooks(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error
- func GetAssigneeIDsByIssue(issueID int64) ([]int64, error)
- func GetAssigneesByIssue(issue *Issue) (assignees []*user_model.User, err error)
- func GetForksByUserAndOrgs(user *user_model.User, repo *repo_model.Repository) ([]*repo_model.Repository, error)
- func GetIssueIDsByRepoID(repoID int64) ([]int64, error)
- func GetIssueWatchersIDs(issueID int64, watching bool) ([]int64, error)
- func GetLabelIDsInOrgByNames(orgID int64, labelNames []string) ([]int64, error)
- func GetLabelIDsInRepoByNames(repoID int64, labelNames []string) ([]int64, error)
- func GetLabelTemplateFile(name string) ([][3]string, error)
- func GetNextCommitStatusIndex(repoID int64, sha string) (int64, error)
- func GetNotificationCount(user *user_model.User, status NotificationStatus) (int64, error)
- func GetOrganizationCount(ctx context.Context, u *user_model.User) (int64, error)
- func GetParticipantsIDsByIssueID(issueID int64) ([]int64, error)
- func GetPullRequestIDsByCheckStatus(status PullRequestStatus) ([]int64, error)
- func GetReleaseAttachments(rels ...*Release) (err error)
- func GetReleaseCountByRepoID(repoID int64, opts FindReleasesOptions) (int64, error)
- func GetRepoAssignees(repo *repo_model.Repository) (_ []*user_model.User, err error)
- func GetRepoIDsForIssuesOptions(opts *IssuesOptions, user *user_model.User) ([]int64, error)
- func GetRepoInitFile(tp, name string) ([]byte, error)
- func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen, numClosed int64)
- func GetRepoReaders(repo *repo_model.Repository) (_ []*user_model.User, err error)
- func GetRepoWriters(repo *repo_model.Repository) (_ []*user_model.User, err error)
- func GetRepositoryFromMatch(ownerName, repoName string) (*repo_model.Repository, error)
- func GetReviewers(repo *repo_model.Repository, doerID, posterID int64) ([]*user_model.User, error)
- func GetStarredRepos(userID int64, private bool, listOptions db.ListOptions) ([]*repo_model.Repository, error)
- func GetTeamIDsByNames(orgID int64, names []string, ignoreNonExistent bool) ([]int64, error)
- func GetTeamMembers(teamID int64) ([]*user_model.User, error)
- func GetTeamNamesByID(teamIDs []int64) ([]string, error)
- func GetTrackedSeconds(opts FindTrackedTimesOptions) (int64, error)
- func GetUserRepositories(opts *SearchRepoOptions) ([]*repo_model.Repository, int64, error)
- func GetUsersWhoCanCreateOrgRepo(orgID int64) ([]*user_model.User, error)
- func GetWatchedRepos(userID int64, private bool, listOptions db.ListOptions) ([]*repo_model.Repository, int64, error)
- func GetYamlFixturesAccess() (string, error)
- func HasAccess(userID int64, repo *repo_model.Repository) (bool, error)
- func HasAccessUnit(user *user_model.User, repo *repo_model.Repository, unitType unit.Type, ...) (bool, error)
- func HasIssueLabel(issueID, labelID int64) bool
- func HasOrgOrUserVisible(org, user *user_model.User) bool
- func HasOrgsVisible(orgs []*Organization, user *user_model.User) bool
- func HasTeamRepo(orgID, teamID, repoID int64) bool
- func HasUnmergedPullRequestsByHeadInfo(repoID int64, branch string) (bool, error)
- func HasWorkInProgressPrefix(title string) bool
- func IncrementRepoForkNum(ctx context.Context, repoID int64) error
- func InitializeLabels(ctx context.Context, repoID int64, labelTemplate string, isOrg bool) error
- func InsertIssueComments(comments []*Comment) error
- func InsertIssues(issues ...*Issue) error
- func InsertMilestones(ms ...*Milestone) (err error)
- func InsertProtectedTag(pt *ProtectedTag) error
- func InsertPullRequests(prs ...*PullRequest) error
- func InsertRelease(rel *Release) error
- func InsertReleases(rels ...*Release) error
- func InsertReleasesContext(ctx context.Context, rels []*Release) error
- func InsertReviews(reviews []*Review) error
- func InternalPushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string
- func IsCollaborator(repoID, userID int64) (bool, error)
- func IsContentEmptyErr(err error) bool
- func IsErrAccessTokenEmpty(err error) bool
- func IsErrAccessTokenNotExist(err error) bool
- func IsErrBranchAlreadyExists(err error) bool
- func IsErrBranchDoesNotExist(err error) bool
- func IsErrBranchNameConflict(err error) bool
- func IsErrBranchesEqual(err error) bool
- func IsErrCircularDependency(err error) bool
- func IsErrCommentNotExist(err error) bool
- func IsErrCommitIDDoesNotMatch(err error) bool
- func IsErrDependenciesLeft(err error) bool
- func IsErrDependencyExists(err error) bool
- func IsErrDependencyNotExists(err error) bool
- func IsErrErrPullRequestHeadRepoMissing(err error) bool
- func IsErrFilePathInvalid(err error) bool
- func IsErrFilePathProtected(err error) bool
- func IsErrFilenameInvalid(err error) bool
- func IsErrForbiddenIssueReaction(err error) bool
- func IsErrForkAlreadyExist(err error) bool
- func IsErrInvalidCloneAddr(err error) bool
- func IsErrInvalidMergeStyle(err error) bool
- func IsErrInvalidTagName(err error) bool
- func IsErrIssueIsClosed(err error) bool
- func IsErrIssueLabelTemplateLoad(err error) bool
- func IsErrIssueNotExist(err error) bool
- func IsErrIssueWasClosed(err error) bool
- func IsErrLFSFileLocked(err error) bool
- func IsErrLFSLockAlreadyExist(err error) bool
- func IsErrLFSLockNotExist(err error) bool
- func IsErrLFSUnauthorizedAction(err error) bool
- func IsErrLabelNotExist(err error) bool
- func IsErrLastOrgOwner(err error) bool
- func IsErrMergeConflicts(err error) bool
- func IsErrMergeUnrelatedHistories(err error) bool
- func IsErrMilestoneNotExist(err error) bool
- func IsErrNewIssueInsert(err error) bool
- func IsErrNoPendingTransfer(err error) bool
- func IsErrNotAllowedToMerge(err error) bool
- func IsErrNotExist(err error) bool
- func IsErrNotValidReviewRequest(err error) bool
- func IsErrOrgLabelNotExist(err error) bool
- func IsErrOrgNotExist(err error) bool
- func IsErrProjectBoardNotExist(err error) bool
- func IsErrProjectNotExist(err error) bool
- func IsErrProtectedTagName(err error) bool
- func IsErrPullRequestAlreadyExists(err error) bool
- func IsErrPullRequestHasMerged(err error) bool
- func IsErrPullRequestNotExist(err error) bool
- func IsErrPullWasClosed(err error) bool
- func IsErrReactionAlreadyExist(err error) bool
- func IsErrRebaseConflicts(err error) bool
- func IsErrReleaseAlreadyExist(err error) bool
- func IsErrReleaseNotExist(err error) bool
- func IsErrRepoFileAlreadyExists(err error) bool
- func IsErrRepoFileDoesNotExist(err error) bool
- func IsErrRepoLabelNotExist(err error) bool
- func IsErrRepoTransferInProgress(err error) bool
- func IsErrReviewNotExist(err error) bool
- func IsErrSHADoesNotMatch(err error) bool
- func IsErrSHANotFound(err error) bool
- func IsErrSHAOrCommitIDNotProvided(err error) bool
- func IsErrStopwatchNotExist(err error) bool
- func IsErrTagAlreadyExists(err error) bool
- func IsErrTaskDoesNotExist(err error) bool
- func IsErrTeamAlreadyExist(err error) bool
- func IsErrTeamNotExist(err error) bool
- func IsErrTrackedTimeNotExist(err error) bool
- func IsErrUnknownDependencyType(err error) bool
- func IsErrUpdateTaskNotExist(err error) bool
- func IsErrUploadNotExist(err error) bool
- func IsErrUserCannotCommit(err error) bool
- func IsErrUserDoesNotHaveAccessToRepo(err error) bool
- func IsErrUserHasOrgs(err error) bool
- func IsErrUserNotAllowedCreateOrg(err error) bool
- func IsErrUserOwnRepos(err error) bool
- func IsErrWikiAlreadyExist(err error) bool
- func IsErrWikiInvalidFileName(err error) bool
- func IsErrWikiReservedName(err error) bool
- func IsOfficialReviewer(issue *Issue, reviewers ...*user_model.User) (bool, error)
- func IsOfficialReviewerTeam(issue *Issue, team *Team) (bool, error)
- func IsOrganizationMember(orgID, uid int64) (bool, error)
- func IsOrganizationOwner(orgID, uid int64) (bool, error)
- func IsOwnerMemberCollaborator(repo *repo_model.Repository, userID int64) (bool, error)
- func IsProjectBoardTypeValid(p ProjectBoardType) bool
- func IsProjectTypeValid(p ProjectType) bool
- func IsProtectedBranch(repoID int64, branchName string) (bool, error)
- func IsPublicMembership(orgID, uid int64) (bool, error)
- func IsReleaseExist(repoID int64, tagName string) (bool, error)
- func IsRepoReader(repo *repo_model.Repository, userID int64) (bool, error)
- func IsTeamMember(orgID, teamID, userID int64) (bool, error)
- func IsUsableTeamName(name string) error
- func IsUserAllowedModifyTag(pt *ProtectedTag, userID int64) (bool, error)
- func IsUserAllowedToControlTag(tags []*ProtectedTag, tagName string, userID int64) (bool, error)
- func IsUserAssignedToIssue(issue *Issue, user *user_model.User) (isAssigned bool, err error)
- func IsUserInTeams(userID int64, teamIDs []int64) (bool, error)
- func IsUserMergeWhitelisted(protectBranch *ProtectedBranch, userID int64, permissionInRepo Permission) bool
- func IsUserOfficialReviewer(protectBranch *ProtectedBranch, user *user_model.User) (bool, error)
- func IsUserOrgOwner(users user_model.UserList, orgID int64) map[int64]bool
- func IsUserParticipantsOfIssue(user *user_model.User, issue *Issue) bool
- func IsUserRealRepoAdmin(repo *repo_model.Repository, user *user_model.User) (bool, error)
- func IsUserRepoAdmin(repo *repo_model.Repository, user *user_model.User) (bool, error)
- func IsUserVisibleToViewer(u, viewer *user_model.User) bool
- func IssueNoDependenciesLeft(issue *Issue) (bool, error)
- func IterateLFS(f func(mo *LFSMetaObject) error) error
- func LFSAutoAssociate(metas []*LFSMetaObject, user *user_model.User, repoID int64) error
- func LFSObjectAccessible(user *user_model.User, oid string) (bool, error)
- func LFSObjectIsAssociated(oid string) (bool, error)
- func LinkedRepository(a *repo_model.Attachment) (*repo_model.Repository, unit.Type, error)
- func LoadLabelsFormatted(labelTemplate string) (string, error)
- func LocalCopyPath() string
- func LockIssue(opts *IssueLockOptions) error
- func Luminance(color uint32) float64
- func MakeIDsFromAPIAssigneesToAdd(oneAssignee string, multipleAssignees []string) (assigneeIDs []int64, err error)
- func MarkConversation(comment *Comment, doer *user_model.User, isResolve bool) (err error)
- func MarkReviewsAsNotStale(issueID int64, commitID string) (err error)
- func MarkReviewsAsStale(issueID int64) (err error)
- func MoveIssuesOnProjectBoard(board *ProjectBoard, sortedIssueIDs map[int64]int64) error
- func NewAccessToken(t *AccessToken) error
- func NewCommitStatus(opts NewCommitStatusOptions) error
- func NewIssue(repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string) (err error)
- func NewIssueLabel(issue *Issue, label *Label, doer *user_model.User) (err error)
- func NewIssueLabels(issue *Issue, labels []*Label, doer *user_model.User) (err error)
- func NewLabel(label *Label) error
- func NewLabels(labels ...*Label) error
- func NewMilestone(m *Milestone) (err error)
- func NewProject(p *Project) error
- func NewProjectBoard(board *ProjectBoard) error
- func NewPullRequest(repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string, ...) (err error)
- func NewRepoContext()
- func NewTeam(t *Team) (err error)
- func NotifyWatchers(actions ...*Action) error
- func NotifyWatchersActions(acts []*Action) error
- func PushUpdateDeleteTag(repo *repo_model.Repository, tagName string) error
- func PushUpdateDeleteTagsContext(ctx context.Context, repo *repo_model.Repository, tags []string) error
- func PushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string
- func RecalculateAccesses(repo *repo_model.Repository) error
- func RecalculateIssueIndexForRepo(repoID int64) error
- func RemoveDeletedBranchByID(repoID, id int64) (err error)
- func RemoveDeletedBranchByName(repoID int64, branch string) error
- func RemoveIssueDependency(user *user_model.User, issue, dep *Issue, depType DependencyType) (err error)
- func RemoveLFSMetaObjectByOid(repoID int64, oid string) (int64, error)
- func RemoveOldDeletedBranches(ctx context.Context, olderThan time.Duration)
- func RemoveOrgUser(orgID, userID int64) error
- func RemoveTeamMember(team *Team, userID int64) error
- func RemoveTemporaryPath(basePath string) error
- func RenameBranch(repo *repo_model.Repository, from, to string, ...) (err error)
- func ReviewExists(issue *Issue, treePath string, line int64) (bool, error)
- func SaveOrUpdateTag(repo *repo_model.Repository, newRel *Release) error
- func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int64, []int64, error)
- func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond
- func SearchRepositoryIDs(opts *SearchRepoOptions) ([]int64, int64, error)
- func SecToTime(duration int64) string
- func SetDefaultBoard(projectID, boardID int64) error
- func SetRepoReadBy(repoID, userID int64) error
- func SortReleases(rels []*Release)
- func SrgbToLinear(color uint8) float64
- func StatsCorrectSQL(ctx context.Context, sql string, id int64) error
- func StopwatchExists(userID, issueID int64) bool
- func SubmitReview(doer *user_model.User, issue *Issue, reviewType ReviewType, ...) (*Review, *Comment, error)
- func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error
- func TotalTimes(options *FindTrackedTimesOptions) (map[*user_model.User]string, error)
- func TransferOwnership(doer *user_model.User, newOwnerName string, repo *repo_model.Repository) (err error)
- func UnlockIssue(opts *IssueLockOptions) error
- func UpdateAccessToken(t *AccessToken) error
- func UpdateComment(c *Comment, doer *user_model.User) error
- func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateIssueDeadline(issue *Issue, deadlineUnix timeutil.TimeStamp, doer *user_model.User) (err error)
- func UpdateIssueMentions(ctx context.Context, issueID int64, mentions []*user_model.User) error
- func UpdateIssueUserByRead(uid, issueID int64) error
- func UpdateIssueUsersByMentions(ctx context.Context, issueID int64, uids []int64) error
- func UpdateIssuesMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateLabel(l *Label) error
- func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error
- func UpdateMilestone(m *Milestone, oldIsClosed bool) error
- func UpdateNotificationStatuses(user *user_model.User, currentStatus, desiredStatus NotificationStatus) error
- func UpdateProject(p *Project) error
- func UpdateProjectBoard(board *ProjectBoard) error
- func UpdateProjectBoardSorting(bs ProjectBoardList) error
- func UpdateProtectBranch(repo *repo_model.Repository, protectBranch *ProtectedBranch, ...) (err error)
- func UpdateProtectedTag(pt *ProtectedTag) error
- func UpdateReactionsMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, userID int64) error
- func UpdateRelease(ctx context.Context, rel *Release) error
- func UpdateReleasesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateRepoSize(ctx context.Context, repo *repo_model.Repository) error
- func UpdateRepoStats(ctx context.Context, id int64) error
- func UpdateRepository(repo *repo_model.Repository, visibilityChanged bool) (err error)
- func UpdateRepositoryCtx(ctx context.Context, repo *repo_model.Repository, visibilityChanged bool) error
- func UpdateReviewsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateTeam(t *Team, authChanged, includeAllChanged bool) (err error)
- func UpdateTeamUnits(team *Team, units []TeamUnit) (err error)
- func UploadLocalPath(uuid string) string
- func UsersInTeamsCount(userIDs, teamIDs []int64) (int64, error)
- type Access
- type AccessToken
- type AccessibleReposEnvironment
- type Action
- func (a *Action) GetActFullName() string
- func (a *Action) GetActUserName() string
- func (a *Action) GetBranch() string
- func (a *Action) GetCommentLink() string
- func (a *Action) GetContent() string
- func (a *Action) GetCreate() time.Time
- func (a *Action) GetDisplayName() string
- func (a *Action) GetDisplayNameTitle() string
- func (a *Action) GetIssueContent() string
- func (a *Action) GetIssueInfos() []string
- func (a *Action) GetIssueTitle() string
- func (a *Action) GetOpType() ActionType
- func (a *Action) GetRefLink() string
- func (a *Action) GetRepoLink() string
- func (a *Action) GetRepoName() string
- func (a *Action) GetRepoPath() string
- func (a *Action) GetRepoUserName() string
- func (a *Action) GetTag() string
- func (a *Action) LoadActUser()
- func (a *Action) ShortActUserName() string
- func (a *Action) ShortRepoName() string
- func (a *Action) ShortRepoPath() string
- func (a *Action) ShortRepoUserName() string
- type ActionList
- type ActionType
- type ActivityAuthorData
- type ActivityStats
- func (stats *ActivityStats) ActiveIssueCount() int
- func (stats *ActivityStats) ActivePRCount() int
- func (stats *ActivityStats) ClosedIssueCount() int
- func (stats *ActivityStats) ClosedIssuePerc() int
- func (stats *ActivityStats) FillIssues(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillPullRequests(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillReleases(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillUnresolvedIssues(repoID int64, fromTime time.Time, issues, prs bool) error
- func (stats *ActivityStats) MergedPRCount() int
- func (stats *ActivityStats) MergedPRPerc() int
- func (stats *ActivityStats) OpenedIssueCount() int
- func (stats *ActivityStats) OpenedIssuePerc() int
- func (stats *ActivityStats) OpenedPRCount() int
- func (stats *ActivityStats) OpenedPRPerc() int
- func (stats *ActivityStats) PublishedReleaseCount() int
- func (stats *ActivityStats) UnresolvedIssueCount() int
- type CodeComments
- type Collaboration
- type Collaborator
- type Comment
- func AddReviewRequest(issue *Issue, reviewer, doer *user_model.User) (*Comment, error)
- func AddTeamReviewRequest(issue *Issue, reviewer *Team, doer *user_model.User) (*Comment, error)
- func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error)
- func CreatePushPullComment(pusher *user_model.User, pr *PullRequest, oldCommitID, newCommitID string) (comment *Comment, err error)
- func FetchCodeCommentsByLine(issue *Issue, currentUser *user_model.User, treePath string, line int64) ([]*Comment, error)
- func FindComments(opts *FindCommentsOptions) ([]*Comment, error)
- func GetCommentByID(id int64) (*Comment, error)
- func RemoveReviewRequest(issue *Issue, reviewer, doer *user_model.User) (*Comment, error)
- func RemoveTeamReviewRequest(issue *Issue, reviewer *Team, doer *user_model.User) (*Comment, error)
- func UpdateIssueByAPI(issue *Issue, doer *user_model.User) (statusChangeComment *Comment, titleChanged bool, err error)
- func (c *Comment) APIURL() string
- func (c *Comment) AfterDelete()
- func (c *Comment) AfterLoad(session *xorm.Session)
- func (c *Comment) BeforeInsert()
- func (c *Comment) BeforeUpdate()
- func (c *Comment) CheckInvalidation(repo *git.Repository, doer *user_model.User, branch string) error
- func (c *Comment) CodeCommentURL() string
- func (c *Comment) DiffSide() string
- func (c *Comment) EventTag() string
- func (c *Comment) HTMLURL() string
- func (c *Comment) HashTag() string
- func (c *Comment) IsResolved() bool
- func (c *Comment) IssueURL() string
- func (c *Comment) LoadAssigneeUserAndTeam() error
- func (c *Comment) LoadAttachments() error
- func (c *Comment) LoadDepIssueDetails() (err error)
- func (c *Comment) LoadIssue() (err error)
- func (c *Comment) LoadLabel() error
- func (c *Comment) LoadMilestone() error
- func (c *Comment) LoadPoster() error
- func (c *Comment) LoadProject() error
- func (c *Comment) LoadPushCommits() (err error)
- func (c *Comment) LoadReactions(repo *repo_model.Repository) error
- func (comment *Comment) LoadRefComment() (err error)
- func (comment *Comment) LoadRefIssue() (err error)
- func (c *Comment) LoadResolveDoer() (err error)
- func (c *Comment) LoadReview() error
- func (c *Comment) LoadTime() error
- func (c *Comment) PRURL() string
- func (comment *Comment) RefCommentHTMLURL() string
- func (comment *Comment) RefIssueHTMLURL() string
- func (comment *Comment) RefIssueIdent() string
- func (comment *Comment) RefIssueTitle() string
- func (c *Comment) UnsignedLine() uint64
- func (c *Comment) UpdateAttachments(uuids []string) error
- type CommentList
- type CommentType
- type CommitStatus
- type CommitStatusIndex
- type CommitStatusOptions
- type ContentEmptyErr
- type CreateCommentOptions
- type CreateRepoOptions
- type CreateReviewOptions
- type DeletedBranch
- type DependencyInfo
- type DependencyType
- type ErrAccessTokenEmpty
- type ErrAccessTokenNotExist
- type ErrBranchAlreadyExists
- type ErrBranchDoesNotExist
- type ErrBranchNameConflict
- type ErrBranchesEqual
- type ErrCircularDependency
- type ErrCommentNotExist
- type ErrCommitIDDoesNotMatch
- type ErrDependenciesLeft
- type ErrDependencyExists
- type ErrDependencyNotExists
- type ErrFilePathInvalid
- type ErrFilePathProtected
- type ErrFilenameInvalid
- type ErrForbiddenIssueReaction
- type ErrForkAlreadyExist
- type ErrInvalidCloneAddr
- type ErrInvalidMergeStyle
- type ErrInvalidTagName
- type ErrIssueIsClosed
- type ErrIssueLabelTemplateLoad
- type ErrIssueNotExist
- type ErrIssueStopwatchAlreadyExist
- type ErrIssueStopwatchNotExist
- type ErrIssueWasClosed
- type ErrLFSFileLocked
- type ErrLFSLockAlreadyExist
- type ErrLFSLockNotExist
- type ErrLFSUnauthorizedAction
- type ErrLabelNotExist
- type ErrLastOrgOwner
- type ErrMergeConflicts
- type ErrMergeUnrelatedHistories
- type ErrMilestoneNotExist
- type ErrNewIssueInsert
- type ErrNoPendingRepoTransfer
- type ErrNotAllowedToMerge
- type ErrNotExist
- type ErrNotValidReviewRequest
- type ErrOrgLabelNotExist
- type ErrOrgNotExist
- type ErrProjectBoardNotExist
- type ErrProjectNotExist
- type ErrProtectedTagName
- type ErrPullRequestAlreadyExists
- type ErrPullRequestHasMerged
- type ErrPullRequestHeadRepoMissing
- type ErrPullRequestNotExist
- type ErrPullWasClosed
- type ErrReactionAlreadyExist
- type ErrRebaseConflicts
- type ErrReleaseAlreadyExist
- type ErrReleaseNotExist
- type ErrRepoFileAlreadyExists
- type ErrRepoFileDoesNotExist
- type ErrRepoLabelNotExist
- type ErrRepoTransferInProgress
- type ErrReviewNotExist
- type ErrSHADoesNotMatch
- type ErrSHANotFound
- type ErrSHAOrCommitIDNotProvided
- type ErrStopwatchNotExist
- type ErrTagAlreadyExists
- type ErrTaskDoesNotExist
- type ErrTeamAlreadyExist
- type ErrTeamNotExist
- type ErrTrackedTimeNotExist
- type ErrUnknownDependencyType
- type ErrUpdateTaskNotExist
- type ErrUploadNotExist
- type ErrUserCannotCommit
- type ErrUserDoesNotHaveAccessToRepo
- type ErrUserHasOrgs
- type ErrUserNotAllowedCreateOrg
- type ErrUserOwnRepos
- type ErrWikiAlreadyExist
- type ErrWikiInvalidFileName
- type ErrWikiReservedName
- type FindCommentsOptions
- type FindNotificationOptions
- type FindOrgMembersOpts
- type FindOrgOptions
- type FindReactionsOptions
- type FindReleasesOptions
- type FindReviewOptions
- type FindTaskOptions
- type FindTrackedTimesOptions
- type GenerateRepoOptions
- type GetFeedsOptions
- type GetMilestonesOption
- type GiteaTemplate
- type Issue
- func GetIssueByID(id int64) (*Issue, error)
- func GetIssueByIndex(repoID, index int64) (*Issue, error)
- func GetIssueWithAttrsByID(id int64) (*Issue, error)
- func GetIssueWithAttrsByIndex(repoID, index int64) (*Issue, error)
- func GetIssuesByIDs(issueIDs []int64) ([]*Issue, error)
- func Issues(opts *IssuesOptions) ([]*Issue, error)
- func (issue *Issue) APIURL() string
- func (issue *Issue) BlockedByDependencies() ([]*DependencyInfo, error)
- func (issue *Issue) BlockingDependencies() ([]*DependencyInfo, error)
- func (issue *Issue) ChangeContent(doer *user_model.User, content string) (err error)
- func (issue *Issue) ChangeRef(doer *user_model.User, oldRef string) (err error)
- func (issue *Issue) ChangeStatus(doer *user_model.User, isClosed bool) (*Comment, error)
- func (issue *Issue) ChangeTitle(doer *user_model.User, oldTitle string) (err error)
- func (issue *Issue) ClearLabels(doer *user_model.User) (err error)
- func (issue *Issue) DiffURL() string
- func (issue *Issue) FindAndUpdateIssueMentions(ctx context.Context, doer *user_model.User, content string) (mentions []*user_model.User, err error)
- func (issue *Issue) GetIsRead(userID int64) error
- func (issue *Issue) GetLastComment() (*Comment, error)
- func (issue *Issue) GetLastEventLabel() string
- func (issue *Issue) GetLastEventLabelFake() string
- func (issue *Issue) GetLastEventTimestamp() timeutil.TimeStamp
- func (issue *Issue) GetPullRequest() (pr *PullRequest, err error)
- func (issue *Issue) GetTasks() int
- func (issue *Issue) GetTasksDone() int
- func (issue *Issue) HTMLURL() string
- func (issue *Issue) HasLabel(labelID int64) bool
- func (issue *Issue) HashTag() string
- func (issue *Issue) IsOverdue() bool
- func (issue *Issue) IsPoster(uid int64) bool
- func (issue *Issue) IsTimetrackerEnabled() bool
- func (issue *Issue) Link() string
- func (issue *Issue) LoadAssignees() error
- func (issue *Issue) LoadAttributes() error
- func (issue *Issue) LoadDiscussComments() error
- func (issue *Issue) LoadLabels() error
- func (issue *Issue) LoadMilestone() error
- func (issue *Issue) LoadPoster() error
- func (i *Issue) LoadProject() (err error)
- func (issue *Issue) LoadPullRequest() error
- func (issue *Issue) LoadRepo() error
- func (issue *Issue) PatchURL() string
- func (i *Issue) ProjectBoardID() int64
- func (i *Issue) ProjectID() int64
- func (issue *Issue) ReadBy(userID int64) error
- func (issue *Issue) ReplaceLabels(labels []*Label, doer *user_model.User) (err error)
- func (issue *Issue) ResolveMentionsByVisibility(ctx context.Context, doer *user_model.User, mentions []string) (users []*user_model.User, err error)
- func (issue *Issue) State() api.StateType
- func (issue *Issue) ToggleAssignee(doer *user_model.User, assigneeID int64) (removed bool, comment *Comment, err error)
- func (issue *Issue) UpdateAttachments(uuids []string) (err error)
- type IssueAssignees
- type IssueByLabelCount
- type IssueByRepositoryCount
- type IssueDependency
- type IssueIndex
- type IssueLabel
- type IssueList
- func (issues IssueList) GetApprovalCounts() (map[int64][]*ReviewCount, error)
- func (issues IssueList) LoadAttachments() error
- func (issues IssueList) LoadAttributes() error
- func (issues IssueList) LoadComments() error
- func (issues IssueList) LoadDiscussComments() error
- func (issues IssueList) LoadPullRequests() error
- func (issues IssueList) LoadRepositories() ([]*repo_model.Repository, error)
- type IssueLockOptions
- type IssueStats
- type IssueStatsOptions
- type IssueUser
- type IssueWatch
- type IssueWatchList
- type IssuesOptions
- type LFSLock
- func CreateLFSLock(repo *repo_model.Repository, lock *LFSLock) (*LFSLock, error)
- func DeleteLFSLockByID(id int64, repo *repo_model.Repository, u *user_model.User, force bool) (*LFSLock, error)
- func GetLFSLock(repo *repo_model.Repository, path string) (*LFSLock, error)
- func GetLFSLockByID(id int64) (*LFSLock, error)
- func GetLFSLockByRepoID(repoID int64, page, pageSize int) ([]*LFSLock, error)
- func GetTreePathLock(repoID int64, treePath string) (*LFSLock, error)
- type LFSMetaObject
- type LFSTokenResponse
- type Label
- func GetLabelByID(id int64) (*Label, error)
- func GetLabelInOrgByID(orgID, labelID int64) (*Label, error)
- func GetLabelInOrgByName(orgID int64, labelName string) (*Label, error)
- func GetLabelInRepoByID(repoID, labelID int64) (*Label, error)
- func GetLabelInRepoByName(repoID int64, labelName string) (*Label, error)
- func GetLabelsByIDs(labelIDs []int64) ([]*Label, error)
- func GetLabelsByIssueID(issueID int64) ([]*Label, error)
- func GetLabelsByOrgID(orgID int64, sortType string, listOptions db.ListOptions) ([]*Label, error)
- func GetLabelsByRepoID(repoID int64, sortType string, listOptions db.ListOptions) ([]*Label, error)
- func GetLabelsInOrgByIDs(orgID int64, labelIDs []int64) ([]*Label, error)
- func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error)
- func (label *Label) BelongsToOrg() bool
- func (label *Label) BelongsToRepo() bool
- func (label *Label) CalOpenIssues()
- func (label *Label) CalOpenOrgIssues(repoID, labelID int64)
- func (label *Label) ForegroundColor() template.CSS
- func (label *Label) LoadSelectedLabelsAfterClick(currentSelectedLabels []int64)
- type ListAccessTokensOptions
- type Milestone
- type MilestoneList
- func GetMilestones(opts GetMilestonesOption) (MilestoneList, int64, error)
- func GetMilestonesByRepoIDs(repoIDs []int64, page int, isClosed bool, sortType string) (MilestoneList, error)
- func SearchMilestones(repoCond builder.Cond, page int, isClosed bool, sortType, keyword string) (MilestoneList, error)
- type MilestonesStats
- type MinimalOrg
- type NewCommitStatusOptions
- type NewIssueOptions
- type Notification
- type NotificationList
- func (nl NotificationList) LoadAttributes() (err error)
- func (nl NotificationList) LoadComments() ([]int, error)
- func (nl NotificationList) LoadIssues() ([]int, error)
- func (nl NotificationList) LoadRepos() (RepositoryList, []int, error)
- func (nl NotificationList) Without(failures []int) NotificationList
- type NotificationSource
- type NotificationStatus
- type OrgUser
- type Organization
- func FindOrgs(opts FindOrgOptions) ([]*Organization, error)
- func GetOrgByID(id int64) (*Organization, error)
- func GetOrgByIDCtx(ctx context.Context, id int64) (*Organization, error)
- func GetOrgByName(name string) (*Organization, error)
- func GetOrgsCanCreateRepoByUserID(userID int64) ([]*Organization, error)
- func GetOwnedOrgsByUserID(userID int64) ([]*Organization, error)
- func GetOwnedOrgsByUserIDDesc(userID int64, desc string) ([]*Organization, error)
- func OrgFromUser(user *user_model.User) *Organization
- func (org *Organization) AccessibleReposEnv(userID int64) (AccessibleReposEnvironment, error)
- func (org *Organization) AccessibleTeamReposEnv(team *Team) AccessibleReposEnvironment
- func (org *Organization) AddMember(uid int64) error
- func (org *Organization) AsUser() *user_model.User
- func (org *Organization) AvatarLink() string
- func (org *Organization) CanCreateOrgRepo(uid int64) (bool, error)
- func (org *Organization) CanCreateRepo() bool
- func (org *Organization) CustomAvatarRelativePath() string
- func (org *Organization) DisplayName() string
- func (org *Organization) GetMembers() (user_model.UserList, map[int64]bool, error)
- func (org *Organization) GetOrgUserMaxAuthorizeLevel(uid int64) (perm.AccessMode, error)
- func (org *Organization) GetOwnerTeam() (*Team, error)
- func (org *Organization) GetTeam(name string) (*Team, error)
- func (org *Organization) GetUserTeamIDs(userID int64) ([]int64, error)
- func (org *Organization) GetUserTeams(userID int64) ([]*Team, error)
- func (org *Organization) HTMLURL() string
- func (org *Organization) HasMemberWithUserID(userID int64) bool
- func (org *Organization) HomeLink() string
- func (org *Organization) IsOrgMember(uid int64) (bool, error)
- func (org *Organization) IsOwnedBy(uid int64) (bool, error)
- func (org *Organization) LoadTeams() ([]*Team, error)
- func (org *Organization) OrganisationLink() string
- func (org *Organization) RemoveMember(uid int64) error
- func (org *Organization) RemoveOrgRepo(repoID int64) error
- func (org *Organization) ShortName(length int) string
- func (Organization) TableName() string
- func (org *Organization) TeamsWithAccessToRepo(repoID int64, mode perm.AccessMode) ([]*Team, error)
- type Permission
- func (p *Permission) CanAccess(mode perm_model.AccessMode, unitType unit.Type) bool
- func (p *Permission) CanAccessAny(mode perm_model.AccessMode, unitTypes ...unit.Type) bool
- func (p *Permission) CanRead(unitType unit.Type) bool
- func (p *Permission) CanReadAny(unitTypes ...unit.Type) bool
- func (p *Permission) CanReadIssuesOrPulls(isPull bool) bool
- func (p *Permission) CanWrite(unitType unit.Type) bool
- func (p *Permission) CanWriteIssuesOrPulls(isPull bool) bool
- func (p *Permission) ColorFormat(s fmt.State)
- func (p *Permission) HasAccess() bool
- func (p *Permission) IsAdmin() bool
- func (p *Permission) IsOwner() bool
- func (p *Permission) UnitAccessMode(unitType unit.Type) perm_model.AccessMode
- type Project
- type ProjectBoard
- type ProjectBoardList
- type ProjectBoardType
- type ProjectIssue
- type ProjectSearchOptions
- type ProjectType
- type ProjectsConfig
- type ProtectedBranch
- func (protectBranch *ProtectedBranch) CanUserPush(userID int64) bool
- func (protectBranch *ProtectedBranch) GetGrantedApprovalsCount(pr *PullRequest) int64
- func (protectBranch *ProtectedBranch) GetProtectedFilePatterns() []glob.Glob
- func (protectBranch *ProtectedBranch) GetUnprotectedFilePatterns() []glob.Glob
- func (protectBranch *ProtectedBranch) HasEnoughApprovals(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) IsProtected() bool
- func (protectBranch *ProtectedBranch) IsProtectedFile(patterns []glob.Glob, path string) bool
- func (protectBranch *ProtectedBranch) IsUnprotectedFile(patterns []glob.Glob, path string) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByOfficialReviewRequests(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByOutdatedBranch(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByProtectedFiles(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByRejectedReview(pr *PullRequest) bool
- type ProtectedTag
- type PullRequest
- func GetAllUnmergedAgitPullRequestByPoster(uid int64) ([]*PullRequest, error)
- func GetLatestPullRequestByHeadInfo(repoID int64, branch string) (*PullRequest, error)
- func GetPullRequestByID(id int64) (*PullRequest, error)
- func GetPullRequestByIndex(repoID, index int64) (*PullRequest, error)
- func GetPullRequestByIssueID(issueID int64) (*PullRequest, error)
- func GetPullRequestByIssueIDWithNoAttributes(issueID int64) (*PullRequest, error)
- func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string, ...) (*PullRequest, error)
- func GetUnmergedPullRequestsByBaseInfo(repoID int64, branch string) ([]*PullRequest, error)
- func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequest, error)
- func PullRequests(baseRepoID int64, opts *PullRequestsOptions) ([]*PullRequest, int64, error)
- func (pr *PullRequest) CanAutoMerge() bool
- func (pr *PullRequest) GetApprovalCounts() ([]*ReviewCount, error)
- func (pr *PullRequest) GetApprovers() string
- func (pr *PullRequest) GetBaseBranchHTMLURL() string
- func (pr *PullRequest) GetDefaultMergeMessage() string
- func (pr *PullRequest) GetDefaultSquashMessage() string
- func (pr *PullRequest) GetGitRefName() string
- func (pr *PullRequest) GetHeadBranchHTMLURL() string
- func (pr *PullRequest) GetWorkInProgressPrefix() string
- func (pr *PullRequest) IsChecking() bool
- func (pr *PullRequest) IsEmpty() bool
- func (pr *PullRequest) IsFilesConflicted() bool
- func (pr *PullRequest) IsSameRepo() bool
- func (pr *PullRequest) IsWorkInProgress() bool
- func (pr *PullRequest) LoadAttributes() error
- func (pr *PullRequest) LoadBaseRepo() error
- func (pr *PullRequest) LoadHeadRepo() error
- func (pr *PullRequest) LoadIssue() (err error)
- func (pr *PullRequest) LoadProtectedBranch() (err error)
- func (pr *PullRequest) MustHeadUserName() string
- func (pr *PullRequest) ResolveCrossReferences() ([]*Comment, error)
- func (pr *PullRequest) SetMerged() (bool, error)
- func (pr *PullRequest) Update() error
- func (pr *PullRequest) UpdateCols(cols ...string) error
- func (pr *PullRequest) UpdateColsIfNotMerged(cols ...string) error
- func (pr *PullRequest) UpdateCommitDivergence(ahead, behind int) error
- type PullRequestFlow
- type PullRequestList
- type PullRequestStatus
- type PullRequestType
- type PullRequestsOptions
- type PushActionContent
- type Reaction
- type ReactionList
- func (list ReactionList) GetFirstUsers() string
- func (list ReactionList) GetMoreUserCount() int
- func (list ReactionList) GroupByType() map[string]ReactionList
- func (list ReactionList) HasUser(userID int64) bool
- func (list ReactionList) LoadUsers(repo *repo_model.Repository) ([]*user_model.User, error)
- type ReactionOptions
- type Release
- func GetLatestReleaseByRepoID(repoID int64) (*Release, error)
- func GetRelease(repoID int64, tagName string) (*Release, error)
- func GetReleaseByID(id int64) (*Release, error)
- func GetReleasesByRepoID(repoID int64, opts FindReleasesOptions) ([]*Release, error)
- func GetReleasesByRepoIDAndNames(ctx context.Context, repoID int64, tagNames []string) (rels []*Release, err error)
- type RenamedBranch
- type RepoTransfer
- type RepositoryList
- func RepositoryListOfMap(repoMap map[int64]*repo_model.Repository) RepositoryList
- func SearchRepository(opts *SearchRepoOptions) (RepositoryList, int64, error)
- func SearchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond, loadAttributes bool) (RepositoryList, int64, error)
- func SearchRepositoryByName(opts *SearchRepoOptions) (RepositoryList, int64, error)
- type Review
- func CreateReview(opts CreateReviewOptions) (*Review, error)
- func FindReviews(opts FindReviewOptions) ([]*Review, error)
- func GetCurrentReview(reviewer *user_model.User, issue *Issue) (*Review, error)
- func GetReviewByID(id int64) (*Review, error)
- func GetReviewByIssueIDAndUserID(issueID, userID int64) (*Review, error)
- func GetReviewersByIssueID(issueID int64) ([]*Review, error)
- func GetReviewersFromOriginalAuthorsByIssueID(issueID int64) ([]*Review, error)
- func GetTeamReviewerByIssueIDAndTeamID(issueID, teamID int64) (review *Review, err error)
- type ReviewCount
- type ReviewType
- type RoleDescriptor
- type SearchMembersOptions
- type SearchOrderBy
- type SearchOrganizationsOptions
- type SearchRepoOptions
- type SearchTeamOptions
- type SignCommitWithStatuses
- type Statistic
- type Stopwatch
- type Task
- type Team
- func GetRepoTeams(repo *repo_model.Repository) ([]*Team, error)
- func GetReviewerTeams(repo *repo_model.Repository) ([]*Team, error)
- func GetTeam(orgID int64, name string) (*Team, error)
- func GetTeamByID(teamID int64) (*Team, error)
- func GetTeamsWithAccessToRepo(orgID, repoID int64, mode perm.AccessMode) ([]*Team, error)
- func GetUserOrgTeams(orgID, userID int64) ([]*Team, error)
- func SearchTeam(opts *SearchTeamOptions) ([]*Team, int64, error)
- func (t *Team) AddAllRepositories() (err error)
- func (t *Team) AddMember(userID int64) error
- func (t *Team) AddRepository(repo *repo_model.Repository) (err error)
- func (t *Team) ColorFormat(s fmt.State)
- func (t *Team) GetMembers(opts *SearchMembersOptions) (err error)
- func (t *Team) GetRepositories(opts *SearchTeamOptions) error
- func (t *Team) GetUnitNames() (res []string)
- func (t *Team) GetUnits() error
- func (t *Team) GetUnitsMap() map[string]string
- func (t *Team) HasRepository(repoID int64) bool
- func (t *Team) IsMember(userID int64) bool
- func (t *Team) IsOwnerTeam() bool
- func (t *Team) RemoveAllRepositories() (err error)
- func (t *Team) RemoveMember(userID int64) error
- func (t *Team) RemoveRepository(repoID int64) error
- func (t *Team) UnitAccessMode(tp unit.Type) perm.AccessMode
- func (t *Team) UnitEnabled(tp unit.Type) bool
- type TeamRepo
- type TeamUnit
- type TeamUser
- type TrackedTime
- type TrackedTimeList
- type TranslatableMessage
- type Upload
- type UserHeatmapData
- type UserIDCount
- type UserIssueStatsOptions
- type WhitelistOptions
Constants ¶
const ( EnvRepoName = "GITEA_REPO_NAME" EnvRepoUsername = "GITEA_REPO_USER_NAME" EnvRepoID = "GITEA_REPO_ID" EnvRepoIsWiki = "GITEA_REPO_IS_WIKI" EnvPusherName = "GITEA_PUSHER_NAME" EnvPusherEmail = "GITEA_PUSHER_EMAIL" EnvPusherID = "GITEA_PUSHER_ID" EnvKeyID = "GITEA_KEY_ID" EnvIsDeployKey = "GITEA_IS_DEPLOY_KEY" EnvPRID = "GITEA_PR_ID" EnvIsInternal = "GITEA_INTERNAL_PUSH" EnvAppURL = "GITEA_ROOT_URL" )
env keys for git hooks need
const ( FilterModeAll = iota FilterModeAssign FilterModeCreate FilterModeMention FilterModeReviewRequested )
Filter modes.
const LuminanceThreshold float64 = 0.179
LuminanceThreshold is the luminance at which white and black appear to have the same contrast i.e. x such that 1.05 / (x + 0.05) = (x + 0.05) / 0.05 i.e. math.Sqrt(1.05*0.05) - 0.05
const RepositoryListDefaultPageSize = 64
RepositoryListDefaultPageSize is the default number of repositories to load in memory when running administrative tasks on all (or almost all) of them. The number should be low enough to avoid filling up all RAM with repository data...
Variables ¶
var ( // Gitignores contains the gitiginore files Gitignores []string // Licenses contains the license files Licenses []string // Readmes contains the readme files Readmes []string // LabelTemplates contains the label template files and the list of labels for each file LabelTemplates map[string]string // ItemsPerPage maximum items per page in forks, watchers and stars of a repo ItemsPerPage = 40 )
var BoardColorPattern = regexp.MustCompile("^#[0-9a-fA-F]{6}$")
BoardColorPattern is a regexp witch can validate BoardColor
var ErrLFSObjectNotExist = errors.New("LFS Meta object does not exist")
ErrLFSObjectNotExist is returned from lfs models functions in order to differentiate between database and missing object errors.
var LabelColorPattern = regexp.MustCompile("^#[0-9a-fA-F]{6}$")
LabelColorPattern is a regexp witch can validate LabelColor
Functions ¶
func AccessLevel ¶
func AccessLevel(user *user_model.User, repo *repo_model.Repository) (perm_model.AccessMode, error)
AccessLevel returns the Access a user has to a repository. Will return NoneAccess if the user does not have access.
func AccessLevelUnit ¶ added in v1.11.0
func AccessLevelUnit(user *user_model.User, repo *repo_model.Repository, unitType unit.Type) (perm_model.AccessMode, error)
AccessLevelUnit returns the Access a user has to a repository's. Will return NoneAccess if the user does not have access.
func AccessTokenByNameExists ¶ added in v1.12.0
func AccessTokenByNameExists(token *AccessToken) (bool, error)
AccessTokenByNameExists checks if a token name has been used already by a user.
func AccessibleRepoIDsQuery ¶ added in v1.11.0
func AccessibleRepoIDsQuery(user *user_model.User) *builder.Builder
AccessibleRepoIDsQuery queries accessible repository ids. Usable as a subquery wherever repo ids need to be filtered.
func AddCollaborator ¶ added in v1.16.0
func AddCollaborator(repo *repo_model.Repository, u *user_model.User) error
AddCollaborator adds new collaboration to a repository with default access mode.
func AddDeletePRBranchComment ¶ added in v1.1.0
func AddDeletePRBranchComment(doer *user_model.User, repo *repo_model.Repository, issueID int64, branchName string) error
AddDeletePRBranchComment adds delete branch comment for pull request issue
func AddDeletedBranch ¶ added in v1.16.0
AddDeletedBranch adds a deleted branch to the database
func AddOrgUser ¶
AddOrgUser adds new user to given organization.
func AddReleaseAttachments ¶ added in v1.10.0
func AddReleaseAttachments(ctx context.Context, releaseID int64, attachmentUUIDs []string) (err error)
AddReleaseAttachments adds a release attachments
func AddTeamMember ¶
AddTeamMember adds new membership of given team to given organization, the user will have membership to given organization automatically when needed.
func BuildLabelNamesIssueIDsCondition ¶ added in v1.12.0
BuildLabelNamesIssueIDsCondition returns a builder where get issue ids match label names
func CanBeAssigned ¶ added in v1.11.0
func CanBeAssigned(user *user_model.User, repo *repo_model.Repository, isPull bool) (bool, error)
CanBeAssigned return true if user can be assigned to issue or pull requests in repo Currently any write access (code, issues or pr's) is assignable, to match assignee list in user interface. FIXME: user could send PullRequest also could be assigned???
func CanCreateOrgRepo ¶ added in v1.11.0
CanCreateOrgRepo returns true if user can create repo in organization
func CanMarkConversation ¶ added in v1.12.0
func CanMarkConversation(issue *Issue, doer *user_model.User) (permResult bool, err error)
CanMarkConversation Add or remove Conversation mark for a code comment permission check the PR writer , offfcial reviewer and poster can do it
func CanUserDelete ¶ added in v1.16.0
func CanUserDelete(repo *repo_model.Repository, user *user_model.User) (bool, error)
CanUserDelete returns true if user could delete the repository
func CanUserForkRepo ¶ added in v1.16.0
func CanUserForkRepo(user *user_model.User, repo *repo_model.Repository) (bool, error)
CanUserForkRepo returns true if specified user can fork repository.
func CancelRepositoryTransfer ¶ added in v1.14.0
func CancelRepositoryTransfer(repo *repo_model.Repository) error
CancelRepositoryTransfer marks the repository as ready and remove pending transfer entry, thus cancel the transfer process.
func CancelStopwatch ¶ added in v1.3.0
func CancelStopwatch(user *user_model.User, issue *Issue) error
CancelStopwatch removes the given stopwatch and logs it into issue's timeline.
func ChangeCollaborationAccessMode ¶ added in v1.16.0
func ChangeCollaborationAccessMode(repo *repo_model.Repository, uid int64, mode perm.AccessMode) error
ChangeCollaborationAccessMode sets new access mode for the collaboration.
func ChangeMilestoneAssign ¶
func ChangeMilestoneAssign(issue *Issue, doer *user_model.User, oldMilestoneID int64) (err error)
ChangeMilestoneAssign changes assignment of milestone for issue.
func ChangeMilestoneStatus ¶
ChangeMilestoneStatus changes the milestone open/closed status.
func ChangeMilestoneStatusByRepoIDAndID ¶ added in v1.13.0
ChangeMilestoneStatusByRepoIDAndID changes a milestone open/closed status if the milestone ID is in the repo.
func ChangeOrgUserStatus ¶
ChangeOrgUserStatus changes public or private membership status.
func ChangeProjectAssign ¶ added in v1.13.0
func ChangeProjectAssign(issue *Issue, doer *user_model.User, newProjectID int64) error
ChangeProjectAssign changes the project associated with an issue
func ChangeProjectStatus ¶ added in v1.13.0
ChangeProjectStatus toggle a project between opened and closed
func ChangeProjectStatusByRepoIDAndID ¶ added in v1.13.0
ChangeProjectStatusByRepoIDAndID toggles a project between opened and closed
func CheckDaemonExportOK ¶ added in v1.16.0
func CheckDaemonExportOK(ctx context.Context, repo *repo_model.Repository) error
CheckDaemonExportOK creates/removes git-daemon-export-ok for git-daemon...
func CheckIssueWatch ¶ added in v1.12.0
func CheckIssueWatch(user *user_model.User, issue *Issue) (bool, error)
CheckIssueWatch check if an user is watching an issue it takes participants and repo watch into account
func CheckLFSAccessForRepo ¶ added in v1.4.0
func CheckLFSAccessForRepo(ownerID int64, repo *repo_model.Repository, mode perm.AccessMode) error
CheckLFSAccessForRepo check needed access mode base on action
func CheckRepoStats ¶
CheckRepoStats checks the repository stats
func CheckRepoUnitUser ¶ added in v1.16.0
func CheckRepoUnitUser(repo *repo_model.Repository, user *user_model.User, unitType unit.Type) bool
CheckRepoUnitUser check whether user could visit the unit of this repository
func CommentHashTag ¶ added in v1.5.0
CommentHashTag returns unique hash tag for comment id.
func CommentTypeIsRef ¶ added in v1.10.0
func CommentTypeIsRef(t CommentType) bool
CommentTypeIsRef returns true if CommentType is a reference from another issue
func CopyLFS ¶ added in v1.11.0
func CopyLFS(ctx context.Context, newRepo, oldRepo *repo_model.Repository) error
CopyLFS copies LFS data from one repo to another
func CountAccessTokens ¶ added in v1.16.0
func CountAccessTokens(opts ListAccessTokensOptions) (int64, error)
CountAccessTokens count access tokens belongs to given user by options
func CountCollaborators ¶ added in v1.16.0
CountCollaborators returns total number of collaborators for a repository
func CountCommentTypeLabelWithEmptyLabel ¶ added in v1.14.0
CountCommentTypeLabelWithEmptyLabel count label comments with empty label
func CountCommentTypeLabelWithOutsideLabels ¶ added in v1.14.0
CountCommentTypeLabelWithOutsideLabels count label comments with outside label
func CountComments ¶ added in v1.16.0
func CountComments(opts *FindCommentsOptions) (int64, error)
CountComments count all comments according options by ignoring pagination
func CountIssueLabelWithOutsideLabels ¶ added in v1.14.0
CountIssueLabelWithOutsideLabels count label comments with outside label
func CountIssueWatchers ¶ added in v1.16.0
CountIssueWatchers count watchers/unwatchers of a given issue
func CountIssues ¶ added in v1.13.0
func CountIssues(opts *IssuesOptions) (int64, error)
CountIssues number return of issues by given conditions.
func CountIssuesByRepo ¶ added in v1.2.0
func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error)
CountIssuesByRepo map from repoID to number of issues matching the options
func CountLFSLockByRepoID ¶ added in v1.11.0
CountLFSLockByRepoID returns a count of all LFSLocks associated with a repository.
func CountLFSMetaObjects ¶ added in v1.16.0
CountLFSMetaObjects returns a count of all LFSMetaObjects associated with a repository
func CountLabelsByOrgID ¶ added in v1.16.0
CountLabelsByOrgID count all labels that belong to given organization by ID.
func CountLabelsByRepoID ¶ added in v1.16.0
CountLabelsByRepoID count number of all labels that belong to given repository by ID.
func CountMilestonesByRepoCond ¶ added in v1.12.0
CountMilestonesByRepoCond map from repo conditions to number of milestones matching the options`
func CountMilestonesByRepoCondAndKw ¶ added in v1.15.0
func CountMilestonesByRepoCondAndKw(repoCond builder.Cond, keyword string, isClosed bool) (map[int64]int64, error)
CountMilestonesByRepoCondAndKw map from repo conditions and the keyword of milestones' name to number of milestones matching the options`
func CountNotifications ¶ added in v1.16.0
func CountNotifications(opts *FindNotificationOptions) (int64, error)
CountNotifications count all notifications that fit to the given options and ignore pagination.
func CountNullArchivedRepository ¶ added in v1.12.0
CountNullArchivedRepository counts the number of repositories with is_archived is null
func CountOrgMembers ¶ added in v1.11.0
func CountOrgMembers(opts *FindOrgMembersOpts) (int64, error)
CountOrgMembers counts the organization's members
func CountOrganizations ¶
func CountOrganizations() int64
CountOrganizations returns number of organizations.
func CountOrgs ¶ added in v1.16.0
func CountOrgs(opts FindOrgOptions) (int64, error)
CountOrgs returns total count organizations according options
func CountOrphanedIssueLabels ¶ added in v1.13.5
CountOrphanedIssueLabels return count of IssueLabels witch have no label behind anymore
func CountOrphanedIssues ¶ added in v1.12.0
CountOrphanedIssues count issues without a repo
func CountOrphanedLabels ¶ added in v1.12.0
CountOrphanedLabels return count of labels witch are broken and not accessible via ui anymore
func CountOrphanedObjects ¶ added in v1.11.7
CountOrphanedObjects count subjects with have no existing refobject anymore
func CountReleasesByRepoID ¶ added in v1.15.0
func CountReleasesByRepoID(repoID int64, opts FindReleasesOptions) (int64, error)
CountReleasesByRepoID returns a number of releases matching FindReleaseOptions and RepoID.
func CountRepoClosedMilestones ¶
CountRepoClosedMilestones returns number of closed milestones in given repository.
func CountReviews ¶ added in v1.16.0
func CountReviews(opts FindReviewOptions) (int64, error)
CountReviews returns count of reviews passing FindReviewOptions
func CountTrackedTimes ¶ added in v1.16.0
func CountTrackedTimes(opts *FindTrackedTimesOptions) (int64, error)
CountTrackedTimes returns count of tracked times that fit to the given options.
func CountUnread ¶ added in v1.12.0
func CountUnread(user *user_model.User) int64
CountUnread count unread notifications for a user
func CountUserStopwatches ¶ added in v1.16.0
CountUserStopwatches return count of all stopwatches of a user
func CountWrongUserType ¶ added in v1.14.0
CountWrongUserType count OrgUser who have wrong type
func CreateIssueDependency ¶ added in v1.6.0
func CreateIssueDependency(user *user_model.User, issue, dep *Issue) error
CreateIssueDependency creates a new dependency for an issue
func CreateIssueStopwatch ¶ added in v1.15.7
CreateIssueStopwatch creates a stopwatch if not exist, otherwise return an error
func CreateOrStopIssueStopwatch ¶ added in v1.3.0
func CreateOrStopIssueStopwatch(user *user_model.User, issue *Issue) error
CreateOrStopIssueStopwatch create an issue stopwatch if it's not exist, otherwise finish it
func CreateOrUpdateIssueNotifications ¶ added in v1.1.0
func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error
CreateOrUpdateIssueNotifications creates an issue notification for each watcher, or updates it if already exists receiverID > 0 just send to receiver, else send to all watcher
func CreateOrUpdateIssueWatch ¶ added in v1.2.0
CreateOrUpdateIssueWatch set watching for a user and issue
func CreateOrganization ¶
func CreateOrganization(org *Organization, owner *user_model.User) (err error)
CreateOrganization creates record of a new organization.
func CreatePendingRepositoryTransfer ¶ added in v1.14.0
func CreatePendingRepositoryTransfer(doer, newOwner *user_model.User, repoID int64, teams []*Team) error
CreatePendingRepositoryTransfer transfer a repo from one owner to a new one. it marks the repository transfer as "pending"
func CreateRefComment ¶
func CreateRefComment(doer *user_model.User, repo *repo_model.Repository, issue *Issue, content, commitSHA string) error
CreateRefComment creates a commit reference comment to issue.
func CreateRepoTransferNotification ¶ added in v1.14.0
func CreateRepoTransferNotification(doer, newOwner *user_model.User, repo *repo_model.Repository) error
CreateRepoTransferNotification creates notification for the user a repository was transferred to
func CreateRepository ¶
func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository, overwriteOrAdopt bool) (err error)
CreateRepository creates a repository for the user/organization.
func CreateTask ¶ added in v1.12.0
CreateTask creates a task on database
func CreateTemporaryPath ¶ added in v1.9.0
CreateTemporaryPath creates a temporary path
func DecrementRepoForkNum ¶ added in v1.15.3
DecrementRepoForkNum decrement repository fork number
func DeleteAccessTokenByID ¶
DeleteAccessTokenByID deletes access token by given ID.
func DeleteCollaboration ¶ added in v1.16.0
func DeleteCollaboration(repo *repo_model.Repository, uid int64) (err error)
DeleteCollaboration removes collaboration relation between the user and repository.
func DeleteComment ¶ added in v1.1.0
DeleteComment deletes the comment
func DeleteCommentReaction ¶ added in v1.4.0
func DeleteCommentReaction(doer *user_model.User, issue *Issue, comment *Comment, content string) error
DeleteCommentReaction deletes a reaction on comment.
func DeleteDeployKey ¶
DeleteDeployKey delete deploy keys
func DeleteIssueLabel ¶
func DeleteIssueLabel(issue *Issue, label *Label, doer *user_model.User) (err error)
DeleteIssueLabel deletes issue-label relation.
func DeleteIssueReaction ¶ added in v1.4.0
func DeleteIssueReaction(doer *user_model.User, issue *Issue, content string) error
DeleteIssueReaction deletes a reaction on issue.
func DeleteIssueUserTimes ¶ added in v1.11.0
func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error
DeleteIssueUserTimes deletes times for issue
func DeleteMilestoneByRepoID ¶
DeleteMilestoneByRepoID deletes a milestone from a repository.
func DeleteOldActions ¶ added in v1.15.0
DeleteOldActions deletes all old actions from database.
func DeleteOrganization ¶
func DeleteOrganization(ctx context.Context, org *Organization) error
DeleteOrganization deletes models associated to an organization.
func DeleteOrphanedIssueLabels ¶ added in v1.13.5
func DeleteOrphanedIssueLabels() error
DeleteOrphanedIssueLabels delete IssueLabels witch have no label behind anymore
func DeleteOrphanedIssues ¶ added in v1.12.0
func DeleteOrphanedIssues() error
DeleteOrphanedIssues delete issues without a repo
func DeleteOrphanedLabels ¶ added in v1.12.0
func DeleteOrphanedLabels() error
DeleteOrphanedLabels delete labels witch are broken and not accessible via ui anymore
func DeleteOrphanedObjects ¶ added in v1.11.7
DeleteOrphanedObjects delete subjects with have no existing refobject anymore
func DeleteProjectBoardByID ¶ added in v1.13.0
DeleteProjectBoardByID removes all issues references to the project board.
func DeleteProjectByID ¶ added in v1.13.0
DeleteProjectByID deletes a project from a repository.
func DeleteProtectedBranch ¶ added in v1.16.0
DeleteProtectedBranch removes ProtectedBranch relation between the user and repository.
func DeleteProtectedTag ¶ added in v1.15.0
func DeleteProtectedTag(pt *ProtectedTag) error
DeleteProtectedTag deletes a protected tag by ID
func DeleteReaction ¶ added in v1.4.0
func DeleteReaction(opts *ReactionOptions) error
DeleteReaction deletes reaction for issue or comment.
func DeleteReleaseByID ¶
DeleteReleaseByID deletes a release from database by given ID.
func DeleteRepository ¶
func DeleteRepository(doer *user_model.User, uid, repoID int64) error
DeleteRepository deletes a repository for a user or organization. make sure if you call this func to close open sessions (sqlite will otherwise get a deadlock)
func DeleteReview ¶ added in v1.12.0
DeleteReview delete a review and it's code comments
func DeleteTeam ¶
DeleteTeam deletes given team. It's caller's responsibility to assign organization ID.
func DeleteTime ¶ added in v1.11.0
func DeleteTime(t *TrackedTime) error
DeleteTime delete a specific Time
func DeleteUploadByUUID ¶
DeleteUploadByUUID deletes a upload by UUID
func DeleteUploads ¶
DeleteUploads deletes multiple uploads
func DeleteUser ¶
func DeleteUser(ctx context.Context, u *user_model.User) (err error)
DeleteUser deletes models associated to an user.
func DismissReview ¶ added in v1.14.0
DismissReview change the dismiss status of a review
func DoctorUserStarNum ¶ added in v1.12.2
func DoctorUserStarNum() (err error)
DoctorUserStarNum recalculate Stars number for all user
func FindOrgMembers ¶ added in v1.11.0
func FindOrgMembers(opts *FindOrgMembersOpts) (user_model.UserList, map[int64]bool, error)
FindOrgMembers loads organization members according conditions
func FindRepoRecentCommitStatusContexts ¶ added in v1.10.0
FindRepoRecentCommitStatusContexts returns repository's recent commit status contexts
func FindUserAccessibleRepoIDs ¶ added in v1.5.0
func FindUserAccessibleRepoIDs(user *user_model.User) ([]int64, error)
FindUserAccessibleRepoIDs find all accessible repositories' ID by user's id
func FindUserOrgForks ¶ added in v1.16.0
func FindUserOrgForks(repoID, userID int64) ([]*repo_model.Repository, error)
FindUserOrgForks returns the forked repositories for one user from a repository
func FinishIssueStopwatch ¶ added in v1.15.7
FinishIssueStopwatch if stopwatch exist then finish it otherwise return an error
func FinishIssueStopwatchIfPossible ¶ added in v1.15.7
FinishIssueStopwatchIfPossible if stopwatch exist then finish it otherwise ignore
func FinishMigrateTask ¶ added in v1.10.0
FinishMigrateTask updates database when migrate task finished
func FixCommentTypeLabelWithEmptyLabel ¶ added in v1.14.0
FixCommentTypeLabelWithEmptyLabel count label comments with empty label
func FixCommentTypeLabelWithOutsideLabels ¶ added in v1.14.0
FixCommentTypeLabelWithOutsideLabels count label comments with outside label
func FixIssueLabelWithOutsideLabels ¶ added in v1.14.0
FixIssueLabelWithOutsideLabels fix label comments with outside label
func FixNullArchivedRepository ¶ added in v1.12.0
FixNullArchivedRepository sets is_archived to false where it is null
func FixWrongUserType ¶ added in v1.14.0
FixWrongUserType fix OrgUser who have wrong type
func FullPushingEnvironment ¶ added in v1.9.0
func FullPushingEnvironment(author, committer *user_model.User, repo *repo_model.Repository, repoName string, prID int64) []string
FullPushingEnvironment returns an os environment to allow hooks to work on push
func GenerateIssueLabels ¶ added in v1.11.0
func GenerateIssueLabels(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error
GenerateIssueLabels generates issue labels from a template repository
func GenerateWebhooks ¶ added in v1.11.0
func GenerateWebhooks(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error
GenerateWebhooks generates webhooks from a template repository
func GetAssigneeIDsByIssue ¶ added in v1.11.0
GetAssigneeIDsByIssue returns the IDs of users assigned to an issue but skips joining with `user` for performance reasons. User permissions must be verified elsewhere if required.
func GetAssigneesByIssue ¶ added in v1.5.0
func GetAssigneesByIssue(issue *Issue) (assignees []*user_model.User, err error)
GetAssigneesByIssue returns everyone assigned to that issue
func GetForksByUserAndOrgs ¶ added in v1.16.0
func GetForksByUserAndOrgs(user *user_model.User, repo *repo_model.Repository) ([]*repo_model.Repository, error)
GetForksByUserAndOrgs return forked repos of the user and owned orgs
func GetIssueIDsByRepoID ¶ added in v1.8.0
GetIssueIDsByRepoID returns all issue ids by repo id
func GetIssueWatchersIDs ¶ added in v1.11.0
GetIssueWatchersIDs returns IDs of subscribers or explicit unsubscribers to a given issue id but avoids joining with `user` for performance reasons User permissions must be verified elsewhere if required
func GetLabelIDsInOrgByNames ¶ added in v1.12.0
GetLabelIDsInOrgByNames returns a list of labelIDs by names in a given organization.
func GetLabelIDsInRepoByNames ¶ added in v1.8.0
GetLabelIDsInRepoByNames returns a list of labelIDs by names in a given repository. it silently ignores label names that do not belong to the repository.
func GetLabelTemplateFile ¶
GetLabelTemplateFile loads the label template file by given name, then parses and returns a list of name-color pairs and optionally description.
func GetNextCommitStatusIndex ¶ added in v1.16.0
GetNextCommitStatusIndex retried 3 times to generate a resource index
func GetNotificationCount ¶ added in v1.1.0
func GetNotificationCount(user *user_model.User, status NotificationStatus) (int64, error)
GetNotificationCount returns the notification count for user
func GetOrganizationCount ¶ added in v1.16.0
GetOrganizationCount returns count of membership of organization of the user.
func GetParticipantsIDsByIssueID ¶ added in v1.11.0
GetParticipantsIDsByIssueID returns the IDs of all users who participated in comments of an issue, but skips joining with `user` for performance reasons. User permissions must be verified elsewhere if required.
func GetPullRequestIDsByCheckStatus ¶ added in v1.11.0
func GetPullRequestIDsByCheckStatus(status PullRequestStatus) ([]int64, error)
GetPullRequestIDsByCheckStatus returns all pull requests according the special checking status.
func GetReleaseAttachments ¶ added in v1.1.0
GetReleaseAttachments retrieves the attachments for releases
func GetReleaseCountByRepoID ¶ added in v1.2.0
func GetReleaseCountByRepoID(repoID int64, opts FindReleasesOptions) (int64, error)
GetReleaseCountByRepoID returns the count of releases of repository
func GetRepoAssignees ¶ added in v1.16.0
func GetRepoAssignees(repo *repo_model.Repository) (_ []*user_model.User, err error)
GetRepoAssignees returns all users that have write access and can be assigned to issues of the repository,
func GetRepoIDsForIssuesOptions ¶ added in v1.12.0
func GetRepoIDsForIssuesOptions(opts *IssuesOptions, user *user_model.User) ([]int64, error)
GetRepoIDsForIssuesOptions find all repo ids for the given options
func GetRepoInitFile ¶ added in v1.12.0
GetRepoInitFile returns repository init files
func GetRepoIssueStats ¶
GetRepoIssueStats returns number of open and closed repository issues by given filter mode.
func GetRepoReaders ¶ added in v1.16.0
func GetRepoReaders(repo *repo_model.Repository) (_ []*user_model.User, err error)
GetRepoReaders returns all users that have explicit read access or higher to the repository.
func GetRepoWriters ¶ added in v1.16.0
func GetRepoWriters(repo *repo_model.Repository) (_ []*user_model.User, err error)
GetRepoWriters returns all users that have write access to the repository.
func GetRepositoryFromMatch ¶ added in v1.9.0
func GetRepositoryFromMatch(ownerName, repoName string) (*repo_model.Repository, error)
GetRepositoryFromMatch returns a *repo_model.Repository from a username and repo strings
func GetReviewers ¶ added in v1.16.0
func GetReviewers(repo *repo_model.Repository, doerID, posterID int64) ([]*user_model.User, error)
GetReviewers get all users can be requested to review: * for private repositories this returns all users that have read access or higher to the repository. * for public repositories this returns all users that have read access or higher to the repository, all repo watchers and all organization members. TODO: may be we should have a busy choice for users to block review request to them.
func GetStarredRepos ¶ added in v1.0.0
func GetStarredRepos(userID int64, private bool, listOptions db.ListOptions) ([]*repo_model.Repository, error)
GetStarredRepos returns the repos starred by a particular user
func GetTeamIDsByNames ¶ added in v1.12.0
GetTeamIDsByNames returns a slice of team ids corresponds to names.
func GetTeamMembers ¶
func GetTeamMembers(teamID int64) ([]*user_model.User, error)
GetTeamMembers returns all members in given team of organization.
func GetTeamNamesByID ¶ added in v1.12.0
GetTeamNamesByID returns team's lower name from a list of team ids.
func GetTrackedSeconds ¶ added in v1.11.0
func GetTrackedSeconds(opts FindTrackedTimesOptions) (int64, error)
GetTrackedSeconds return sum of seconds
func GetUserRepositories ¶
func GetUserRepositories(opts *SearchRepoOptions) ([]*repo_model.Repository, int64, error)
GetUserRepositories returns a list of repositories of given user.
func GetUsersWhoCanCreateOrgRepo ¶ added in v1.14.0
func GetUsersWhoCanCreateOrgRepo(orgID int64) ([]*user_model.User, error)
GetUsersWhoCanCreateOrgRepo returns users which are able to create repo in organization
func GetWatchedRepos ¶ added in v1.1.0
func GetWatchedRepos(userID int64, private bool, listOptions db.ListOptions) ([]*repo_model.Repository, int64, error)
GetWatchedRepos returns the repos watched by a particular user
func GetYamlFixturesAccess ¶ added in v1.12.0
GetYamlFixturesAccess returns a string containing the contents for the access table, as recalculated using repo.RecalculateAccesses()
func HasAccess ¶
func HasAccess(userID int64, repo *repo_model.Repository) (bool, error)
HasAccess returns true if user has access to repo
func HasAccessUnit ¶ added in v1.7.0
func HasAccessUnit(user *user_model.User, repo *repo_model.Repository, unitType unit.Type, testMode perm_model.AccessMode) (bool, error)
HasAccessUnit returns true if user has testMode to the unit of the repository
func HasIssueLabel ¶
HasIssueLabel returns true if issue has been labeled.
func HasOrgOrUserVisible ¶ added in v1.15.0
func HasOrgOrUserVisible(org, user *user_model.User) bool
HasOrgOrUserVisible tells if the given user can see the given org or user
func HasOrgsVisible ¶ added in v1.8.0
func HasOrgsVisible(orgs []*Organization, user *user_model.User) bool
HasOrgsVisible tells if the given user can see at least one of the orgs provided
func HasTeamRepo ¶
HasTeamRepo returns true if given repository belongs to team.
func HasUnmergedPullRequestsByHeadInfo ¶ added in v1.16.0
HasUnmergedPullRequestsByHeadInfo checks if there are open and not merged pull request by given head information (repo and branch)
func HasWorkInProgressPrefix ¶ added in v1.15.0
HasWorkInProgressPrefix determines if the given PR title has a Work In Progress prefix
func IncrementRepoForkNum ¶ added in v1.12.0
IncrementRepoForkNum increment repository fork number
func InitializeLabels ¶ added in v1.12.0
InitializeLabels adds a label set to a repository using a template
func InsertIssueComments ¶ added in v1.9.0
InsertIssueComments inserts many comments of issues.
func InsertIssues ¶ added in v1.9.0
InsertIssues insert issues to database
func InsertMilestones ¶ added in v1.9.0
InsertMilestones creates milestones of repository.
func InsertProtectedTag ¶ added in v1.15.0
func InsertProtectedTag(pt *ProtectedTag) error
InsertProtectedTag inserts a protected tag to database
func InsertPullRequests ¶ added in v1.9.0
func InsertPullRequests(prs ...*PullRequest) error
InsertPullRequests inserted pull requests
func InsertRelease ¶ added in v1.10.0
InsertRelease inserts a release
func InsertReleases ¶ added in v1.9.0
InsertReleases migrates release
func InsertReleasesContext ¶ added in v1.12.0
InsertReleasesContext insert releases
func InsertReviews ¶ added in v1.12.0
InsertReviews inserts review and review comments
func InternalPushingEnvironment ¶ added in v1.11.0
func InternalPushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string
InternalPushingEnvironment returns an os environment to switch off hooks on push It is recommended to avoid using this unless you are pushing within a transaction or if you absolutely are sure that post-receive and pre-receive will do nothing We provide the full pushing-environment for other hook providers
func IsCollaborator ¶ added in v1.16.0
IsCollaborator check if a user is a collaborator of a repository
func IsContentEmptyErr ¶ added in v1.11.0
IsContentEmptyErr returns true if err is a ContentEmptyErr
func IsErrAccessTokenEmpty ¶
IsErrAccessTokenEmpty checks if an error is a ErrAccessTokenEmpty.
func IsErrAccessTokenNotExist ¶
IsErrAccessTokenNotExist checks if an error is a ErrAccessTokenNotExist.
func IsErrBranchAlreadyExists ¶ added in v1.3.0
IsErrBranchAlreadyExists checks if an error is an ErrBranchAlreadyExists.
func IsErrBranchDoesNotExist ¶ added in v1.13.0
IsErrBranchDoesNotExist checks if an error is an ErrBranchDoesNotExist.
func IsErrBranchNameConflict ¶ added in v1.3.0
IsErrBranchNameConflict checks if an error is an ErrBranchNameConflict.
func IsErrBranchesEqual ¶ added in v1.11.0
IsErrBranchesEqual checks if an error is an ErrBranchesEqual.
func IsErrCircularDependency ¶ added in v1.6.0
IsErrCircularDependency checks if an error is a ErrCircularDependency.
func IsErrCommentNotExist ¶
IsErrCommentNotExist checks if an error is a ErrCommentNotExist.
func IsErrCommitIDDoesNotMatch ¶ added in v1.9.0
IsErrCommitIDDoesNotMatch checks if an error is a ErrCommitIDDoesNotMatch.
func IsErrDependenciesLeft ¶ added in v1.6.0
IsErrDependenciesLeft checks if an error is a ErrDependenciesLeft.
func IsErrDependencyExists ¶ added in v1.6.0
IsErrDependencyExists checks if an error is a ErrDependencyExists.
func IsErrDependencyNotExists ¶ added in v1.6.0
IsErrDependencyNotExists checks if an error is a ErrDependencyExists.
func IsErrErrPullRequestHeadRepoMissing ¶ added in v1.9.0
IsErrErrPullRequestHeadRepoMissing checks if an error is a ErrPullRequestHeadRepoMissing.
func IsErrFilePathInvalid ¶ added in v1.9.0
IsErrFilePathInvalid checks if an error is an ErrFilePathInvalid.
func IsErrFilePathProtected ¶ added in v1.12.0
IsErrFilePathProtected checks if an error is an ErrFilePathProtected.
func IsErrFilenameInvalid ¶ added in v1.9.0
IsErrFilenameInvalid checks if an error is an ErrFilenameInvalid.
func IsErrForbiddenIssueReaction ¶ added in v1.11.0
IsErrForbiddenIssueReaction checks if an error is a ErrForbiddenIssueReaction.
func IsErrForkAlreadyExist ¶ added in v1.9.0
IsErrForkAlreadyExist checks if an error is an ErrForkAlreadyExist.
func IsErrInvalidCloneAddr ¶
IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.
func IsErrInvalidMergeStyle ¶ added in v1.4.0
IsErrInvalidMergeStyle checks if an error is a ErrInvalidMergeStyle.
func IsErrInvalidTagName ¶
IsErrInvalidTagName checks if an error is a ErrInvalidTagName.
func IsErrIssueIsClosed ¶ added in v1.11.0
IsErrIssueIsClosed checks if an error is a ErrIssueNotExist.
func IsErrIssueLabelTemplateLoad ¶ added in v1.10.0
IsErrIssueLabelTemplateLoad checks if an error is a ErrIssueLabelTemplateLoad.
func IsErrIssueNotExist ¶
IsErrIssueNotExist checks if an error is a ErrIssueNotExist.
func IsErrIssueWasClosed ¶ added in v1.11.0
IsErrIssueWasClosed checks if an error is a ErrIssueWasClosed.
func IsErrLFSFileLocked ¶ added in v1.11.0
IsErrLFSFileLocked checks if an error is a ErrLFSFileLocked.
func IsErrLFSLockAlreadyExist ¶ added in v1.4.0
IsErrLFSLockAlreadyExist checks if an error is a ErrLFSLockAlreadyExist.
func IsErrLFSLockNotExist ¶ added in v1.4.0
IsErrLFSLockNotExist checks if an error is a ErrLFSLockNotExist.
func IsErrLFSUnauthorizedAction ¶ added in v1.4.0
IsErrLFSUnauthorizedAction checks if an error is a ErrLFSUnauthorizedAction.
func IsErrLabelNotExist ¶
IsErrLabelNotExist checks if an error is a ErrLabelNotExist.
func IsErrLastOrgOwner ¶
IsErrLastOrgOwner checks if an error is a ErrLastOrgOwner.
func IsErrMergeConflicts ¶ added in v1.11.0
IsErrMergeConflicts checks if an error is a ErrMergeConflicts.
func IsErrMergeUnrelatedHistories ¶ added in v1.11.0
IsErrMergeUnrelatedHistories checks if an error is a ErrMergeUnrelatedHistories.
func IsErrMilestoneNotExist ¶
IsErrMilestoneNotExist checks if an error is a ErrMilestoneNotExist.
func IsErrNewIssueInsert ¶ added in v1.10.0
IsErrNewIssueInsert checks if an error is a ErrNewIssueInsert.
func IsErrNoPendingTransfer ¶ added in v1.14.0
IsErrNoPendingTransfer is an error type when a repository has no pending transfers
func IsErrNotAllowedToMerge ¶ added in v1.5.0
IsErrNotAllowedToMerge checks if an error is an ErrNotAllowedToMerge.
func IsErrNotExist ¶ added in v1.10.0
IsErrNotExist checks if an error is an ErrNotExist
func IsErrNotValidReviewRequest ¶ added in v1.13.0
IsErrNotValidReviewRequest checks if an error is a ErrNotValidReviewRequest.
func IsErrOrgLabelNotExist ¶ added in v1.12.0
IsErrOrgLabelNotExist checks if an error is a OrgErrLabelNotExist.
func IsErrOrgNotExist ¶ added in v1.2.0
IsErrOrgNotExist checks if an error is a ErrOrgNotExist.
func IsErrProjectBoardNotExist ¶ added in v1.13.0
IsErrProjectBoardNotExist checks if an error is a ErrProjectBoardNotExist
func IsErrProjectNotExist ¶ added in v1.13.0
IsErrProjectNotExist checks if an error is a ErrProjectNotExist
func IsErrProtectedTagName ¶ added in v1.15.0
IsErrProtectedTagName checks if an error is a ErrProtectedTagName.
func IsErrPullRequestAlreadyExists ¶ added in v1.0.0
IsErrPullRequestAlreadyExists checks if an error is a ErrPullRequestAlreadyExists.
func IsErrPullRequestHasMerged ¶ added in v1.11.0
IsErrPullRequestHasMerged checks if an error is a ErrPullRequestHasMerged.
func IsErrPullRequestNotExist ¶
IsErrPullRequestNotExist checks if an error is a ErrPullRequestNotExist.
func IsErrPullWasClosed ¶ added in v1.11.0
IsErrPullWasClosed checks if an error is a ErrErrPullWasClosed.
func IsErrReactionAlreadyExist ¶ added in v1.10.2
IsErrReactionAlreadyExist checks if an error is a ErrReactionAlreadyExist.
func IsErrRebaseConflicts ¶ added in v1.11.0
IsErrRebaseConflicts checks if an error is a ErrRebaseConflicts.
func IsErrReleaseAlreadyExist ¶
IsErrReleaseAlreadyExist checks if an error is a ErrReleaseAlreadyExist.
func IsErrReleaseNotExist ¶
IsErrReleaseNotExist checks if an error is a ErrReleaseNotExist.
func IsErrRepoFileAlreadyExists ¶ added in v1.9.0
IsErrRepoFileAlreadyExists checks if an error is a ErrRepoFileAlreadyExists.
func IsErrRepoFileDoesNotExist ¶ added in v1.9.0
IsErrRepoFileDoesNotExist checks if an error is a ErrRepoDoesNotExist.
func IsErrRepoLabelNotExist ¶ added in v1.12.0
IsErrRepoLabelNotExist checks if an error is a RepoErrLabelNotExist.
func IsErrRepoTransferInProgress ¶ added in v1.14.0
IsErrRepoTransferInProgress checks if an error is a ErrRepoTransferInProgress.
func IsErrReviewNotExist ¶ added in v1.6.0
IsErrReviewNotExist checks if an error is a ErrReviewNotExist.
func IsErrSHADoesNotMatch ¶ added in v1.9.0
IsErrSHADoesNotMatch checks if an error is a ErrSHADoesNotMatch.
func IsErrSHANotFound ¶ added in v1.9.0
IsErrSHANotFound checks if an error is a ErrSHANotFound.
func IsErrSHAOrCommitIDNotProvided ¶ added in v1.9.0
IsErrSHAOrCommitIDNotProvided checks if an error is a ErrSHAOrCommitIDNotProvided.
func IsErrStopwatchNotExist ¶ added in v1.3.0
IsErrStopwatchNotExist checks if an error is a ErrStopwatchNotExist.
func IsErrTagAlreadyExists ¶ added in v1.3.0
IsErrTagAlreadyExists checks if an error is an ErrTagAlreadyExists.
func IsErrTaskDoesNotExist ¶ added in v1.10.0
IsErrTaskDoesNotExist checks if an error is a ErrTaskIsNotExist.
func IsErrTeamAlreadyExist ¶
IsErrTeamAlreadyExist checks if an error is a ErrTeamAlreadyExist.
func IsErrTeamNotExist ¶ added in v1.10.0
IsErrTeamNotExist checks if an error is a ErrTeamNotExist.
func IsErrTrackedTimeNotExist ¶ added in v1.3.0
IsErrTrackedTimeNotExist checks if an error is a ErrTrackedTimeNotExist.
func IsErrUnknownDependencyType ¶ added in v1.6.0
IsErrUnknownDependencyType checks if an error is ErrUnknownDependencyType
func IsErrUpdateTaskNotExist ¶
IsErrUpdateTaskNotExist checks if an error is a ErrUpdateTaskNotExist.
func IsErrUploadNotExist ¶
IsErrUploadNotExist checks if an error is a ErrUploadNotExist.
func IsErrUserCannotCommit ¶ added in v1.9.0
IsErrUserCannotCommit checks if an error is an ErrUserCannotCommit.
func IsErrUserDoesNotHaveAccessToRepo ¶ added in v1.5.0
IsErrUserDoesNotHaveAccessToRepo checks if an error is a ErrRepoFileAlreadyExists.
func IsErrUserHasOrgs ¶
IsErrUserHasOrgs checks if an error is a ErrUserHasOrgs.
func IsErrUserNotAllowedCreateOrg ¶ added in v1.1.0
IsErrUserNotAllowedCreateOrg checks if an error is an ErrUserNotAllowedCreateOrg.
func IsErrUserOwnRepos ¶
IsErrUserOwnRepos checks if an error is a ErrUserOwnRepos.
func IsErrWikiAlreadyExist ¶
IsErrWikiAlreadyExist checks if an error is an ErrWikiAlreadyExist.
func IsErrWikiInvalidFileName ¶ added in v1.4.0
IsErrWikiInvalidFileName checks if an error is an ErrWikiInvalidFileName.
func IsErrWikiReservedName ¶ added in v1.4.0
IsErrWikiReservedName checks if an error is an ErrWikiReservedName.
func IsOfficialReviewer ¶ added in v1.11.0
func IsOfficialReviewer(issue *Issue, reviewers ...*user_model.User) (bool, error)
IsOfficialReviewer check if at least one of the provided reviewers can make official reviews in issue (counts towards required approvals)
func IsOfficialReviewerTeam ¶ added in v1.13.0
IsOfficialReviewerTeam check if reviewer in this team can make official reviews in issue (counts towards required approvals)
func IsOrganizationMember ¶
IsOrganizationMember returns true if given user is member of organization.
func IsOrganizationOwner ¶
IsOrganizationOwner returns true if given user is in the owner team.
func IsOwnerMemberCollaborator ¶ added in v1.16.0
func IsOwnerMemberCollaborator(repo *repo_model.Repository, userID int64) (bool, error)
IsOwnerMemberCollaborator checks if a provided user is the owner, a collaborator or a member of a team in a repository
func IsProjectBoardTypeValid ¶ added in v1.13.0
func IsProjectBoardTypeValid(p ProjectBoardType) bool
IsProjectBoardTypeValid checks if the project board type is valid
func IsProjectTypeValid ¶ added in v1.13.0
func IsProjectTypeValid(p ProjectType) bool
IsProjectTypeValid checks if a project type is valid
func IsProtectedBranch ¶ added in v1.16.0
IsProtectedBranch checks if branch is protected
func IsPublicMembership ¶
IsPublicMembership returns true if given user public his/her membership.
func IsReleaseExist ¶
IsReleaseExist returns true if release with given tag name already exists.
func IsRepoReader ¶ added in v1.16.0
func IsRepoReader(repo *repo_model.Repository, userID int64) (bool, error)
IsRepoReader returns true if user has explicit read access or higher to the repository.
func IsTeamMember ¶
IsTeamMember returns true if given user is a member of team.
func IsUsableTeamName ¶ added in v1.0.0
IsUsableTeamName tests if a name could be as team name
func IsUserAllowedModifyTag ¶ added in v1.16.0
func IsUserAllowedModifyTag(pt *ProtectedTag, userID int64) (bool, error)
IsUserAllowedModifyTag returns true if the user is allowed to modify the tag
func IsUserAllowedToControlTag ¶ added in v1.15.0
func IsUserAllowedToControlTag(tags []*ProtectedTag, tagName string, userID int64) (bool, error)
IsUserAllowedToControlTag checks if a user can control the specific tag. It returns true if the tag name is not protected or the user is allowed to control it.
func IsUserAssignedToIssue ¶ added in v1.5.0
func IsUserAssignedToIssue(issue *Issue, user *user_model.User) (isAssigned bool, err error)
IsUserAssignedToIssue returns true when the user is assigned to the issue
func IsUserInTeams ¶ added in v1.3.0
IsUserInTeams returns if a user in some teams
func IsUserMergeWhitelisted ¶ added in v1.16.0
func IsUserMergeWhitelisted(protectBranch *ProtectedBranch, userID int64, permissionInRepo Permission) bool
IsUserMergeWhitelisted checks if some user is whitelisted to merge to this branch
func IsUserOfficialReviewer ¶ added in v1.16.0
func IsUserOfficialReviewer(protectBranch *ProtectedBranch, user *user_model.User) (bool, error)
IsUserOfficialReviewer check if user is official reviewer for the branch (counts towards required approvals)
func IsUserOrgOwner ¶ added in v1.16.0
func IsUserOrgOwner(users user_model.UserList, orgID int64) map[int64]bool
IsUserOrgOwner returns true if user is in the owner team of given organization.
func IsUserParticipantsOfIssue ¶ added in v1.12.0
func IsUserParticipantsOfIssue(user *user_model.User, issue *Issue) bool
IsUserParticipantsOfIssue return true if user is participants of an issue
func IsUserRealRepoAdmin ¶ added in v1.13.0
func IsUserRealRepoAdmin(repo *repo_model.Repository, user *user_model.User) (bool, error)
IsUserRealRepoAdmin check if this user is real repo admin
func IsUserRepoAdmin ¶ added in v1.7.0
func IsUserRepoAdmin(repo *repo_model.Repository, user *user_model.User) (bool, error)
IsUserRepoAdmin return true if user has admin right of a repo
func IsUserVisibleToViewer ¶ added in v1.16.0
func IsUserVisibleToViewer(u, viewer *user_model.User) bool
IsUserVisibleToViewer check if viewer is able to see user profile
func IssueNoDependenciesLeft ¶ added in v1.6.0
IssueNoDependenciesLeft checks if issue can be closed
func IterateLFS ¶ added in v1.13.0
func IterateLFS(f func(mo *LFSMetaObject) error) error
IterateLFS iterates lfs object
func LFSAutoAssociate ¶ added in v1.11.0
func LFSAutoAssociate(metas []*LFSMetaObject, user *user_model.User, repoID int64) error
LFSAutoAssociate auto associates accessible LFSMetaObjects
func LFSObjectAccessible ¶ added in v1.11.0
func LFSObjectAccessible(user *user_model.User, oid string) (bool, error)
LFSObjectAccessible checks if a provided Oid is accessible to the user
func LFSObjectIsAssociated ¶ added in v1.16.0
LFSObjectIsAssociated checks if a provided Oid is associated
func LinkedRepository ¶ added in v1.16.0
func LinkedRepository(a *repo_model.Attachment) (*repo_model.Repository, unit.Type, error)
LinkedRepository returns the linked repo if any
func LoadLabelsFormatted ¶ added in v1.11.0
LoadLabelsFormatted loads the labels' list of a template file as a string separated by comma
func LocalCopyPath ¶ added in v1.4.0
func LocalCopyPath() string
LocalCopyPath returns the local repository temporary copy path.
func LockIssue ¶ added in v1.8.0
func LockIssue(opts *IssueLockOptions) error
LockIssue locks an issue. This would limit commenting abilities to users with write access to the repo
func MakeIDsFromAPIAssigneesToAdd ¶ added in v1.5.0
func MakeIDsFromAPIAssigneesToAdd(oneAssignee string, multipleAssignees []string) (assigneeIDs []int64, err error)
MakeIDsFromAPIAssigneesToAdd returns an array with all assignee IDs
func MarkConversation ¶ added in v1.12.0
func MarkConversation(comment *Comment, doer *user_model.User, isResolve bool) (err error)
MarkConversation Add or remove Conversation mark for a code comment
func MarkReviewsAsNotStale ¶ added in v1.12.0
MarkReviewsAsNotStale marks existing reviews as not stale for a giving commit SHA
func MarkReviewsAsStale ¶ added in v1.12.0
MarkReviewsAsStale marks existing reviews as stale
func MoveIssuesOnProjectBoard ¶ added in v1.16.0
func MoveIssuesOnProjectBoard(board *ProjectBoard, sortedIssueIDs map[int64]int64) error
MoveIssuesOnProjectBoard moves or keeps issues in a column and sorts them inside that column
func NewAccessToken ¶
func NewAccessToken(t *AccessToken) error
NewAccessToken creates new access token.
func NewCommitStatus ¶ added in v1.2.0
func NewCommitStatus(opts NewCommitStatusOptions) error
NewCommitStatus save commit statuses into database
func NewIssue ¶
func NewIssue(repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string) (err error)
NewIssue creates new issue with labels for repository.
func NewIssueLabel ¶
func NewIssueLabel(issue *Issue, label *Label, doer *user_model.User) (err error)
NewIssueLabel creates a new issue-label relation.
func NewIssueLabels ¶
func NewIssueLabels(issue *Issue, labels []*Label, doer *user_model.User) (err error)
NewIssueLabels creates a list of issue-label relations.
func NewMilestone ¶
NewMilestone creates new milestone of repository.
func NewProject ¶ added in v1.13.0
NewProject creates a new Project
func NewProjectBoard ¶ added in v1.13.0
func NewProjectBoard(board *ProjectBoard) error
NewProjectBoard adds a new project board to a given project
func NewPullRequest ¶
func NewPullRequest(repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error)
NewPullRequest creates new pull request with labels for repository.
func NewTeam ¶
NewTeam creates a record of new team. It's caller's responsibility to assign organization ID.
func NotifyWatchers ¶
NotifyWatchers creates batch of actions for every watcher.
func NotifyWatchersActions ¶ added in v1.11.0
NotifyWatchersActions creates batch of actions for every watcher.
func PushUpdateDeleteTag ¶ added in v1.10.0
func PushUpdateDeleteTag(repo *repo_model.Repository, tagName string) error
PushUpdateDeleteTag must be called for any push actions to delete tag
func PushUpdateDeleteTagsContext ¶ added in v1.12.0
func PushUpdateDeleteTagsContext(ctx context.Context, repo *repo_model.Repository, tags []string) error
PushUpdateDeleteTagsContext updates a number of delete tags with context
func PushingEnvironment ¶ added in v1.9.0
func PushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string
PushingEnvironment returns an os environment to allow hooks to work on push
func RecalculateAccesses ¶ added in v1.16.0
func RecalculateAccesses(repo *repo_model.Repository) error
RecalculateAccesses recalculates all accesses for repository.
func RecalculateIssueIndexForRepo ¶ added in v1.15.0
RecalculateIssueIndexForRepo create issue_index for repo if not exist and update it based on highest index of existing issues assigned to a repo
func RemoveDeletedBranchByID ¶ added in v1.16.0
RemoveDeletedBranchByID removes a deleted branch from the database
func RemoveDeletedBranchByName ¶ added in v1.16.0
RemoveDeletedBranchByName removes all deleted branches
func RemoveIssueDependency ¶ added in v1.6.0
func RemoveIssueDependency(user *user_model.User, issue, dep *Issue, depType DependencyType) (err error)
RemoveIssueDependency removes a dependency from an issue
func RemoveLFSMetaObjectByOid ¶ added in v1.1.0
RemoveLFSMetaObjectByOid removes a LFSMetaObject entry from database by its OID. It may return ErrLFSObjectNotExist or a database error.
func RemoveOldDeletedBranches ¶ added in v1.3.0
RemoveOldDeletedBranches removes old deleted branches
func RemoveOrgUser ¶
RemoveOrgUser removes user from given organization.
func RemoveTeamMember ¶
RemoveTeamMember removes member from given team of given organization.
func RemoveTemporaryPath ¶ added in v1.9.0
RemoveTemporaryPath removes the temporary path
func RenameBranch ¶ added in v1.16.0
func RenameBranch(repo *repo_model.Repository, from, to string, gitAction func(isDefault bool) error) (err error)
RenameBranch rename a branch
func ReviewExists ¶ added in v1.11.0
ReviewExists returns whether a review exists for a particular line of code in the PR
func SaveOrUpdateTag ¶ added in v1.12.0
func SaveOrUpdateTag(repo *repo_model.Repository, newRel *Release) error
SaveOrUpdateTag must be called for any push actions to add tag
func SearchIssueIDsByKeyword ¶ added in v1.8.0
SearchIssueIDsByKeyword search issues on database
func SearchRepositoryCondition ¶ added in v1.11.4
func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond
SearchRepositoryCondition creates a query condition according search repository options
func SearchRepositoryIDs ¶ added in v1.14.0
func SearchRepositoryIDs(opts *SearchRepoOptions) ([]int64, int64, error)
SearchRepositoryIDs takes keyword and part of repository name to search, it returns results in given range and number of total results.
func SecToTime ¶ added in v1.5.0
SecToTime converts an amount of seconds to a human-readable string (example: 66s -> 1min 6s)
func SetDefaultBoard ¶ added in v1.14.0
SetDefaultBoard represents a board for issues not assigned to one if boardID is 0 unset default
func SetRepoReadBy ¶ added in v1.16.0
SetRepoReadBy sets repo to be visited by given user.
func SortReleases ¶
func SortReleases(rels []*Release)
SortReleases sorts releases by number of commits and created time.
func SrgbToLinear ¶ added in v1.16.0
SrgbToLinear converts a component of an sRGB color to its linear intensity See: https://en.wikipedia.org/wiki/SRGB#The_reverse_transformation_(sRGB_to_CIE_XYZ)
func StatsCorrectSQL ¶ added in v1.16.0
func StopwatchExists ¶ added in v1.3.0
StopwatchExists returns true if the stopwatch exists
func SubmitReview ¶ added in v1.11.0
func SubmitReview(doer *user_model.User, issue *Issue, reviewType ReviewType, content, commitID string, stale bool, attachmentUUIDs []string) (*Review, *Comment, error)
SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
func TestRepositoryReadyForTransfer ¶ added in v1.14.0
func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error
TestRepositoryReadyForTransfer make sure repo is ready to transfer
func TotalTimes ¶ added in v1.3.0
func TotalTimes(options *FindTrackedTimesOptions) (map[*user_model.User]string, error)
TotalTimes returns the spent time for each user by an issue
func TransferOwnership ¶
func TransferOwnership(doer *user_model.User, newOwnerName string, repo *repo_model.Repository) (err error)
TransferOwnership transfers all corresponding repository items from old user to new one.
func UnlockIssue ¶ added in v1.8.0
func UnlockIssue(opts *IssueLockOptions) error
UnlockIssue unlocks a previously locked issue.
func UpdateAccessToken ¶
func UpdateAccessToken(t *AccessToken) error
UpdateAccessToken updates information of access token.
func UpdateComment ¶
func UpdateComment(c *Comment, doer *user_model.User) error
UpdateComment updates information of comment.
func UpdateCommentsMigrationsByType ¶ added in v1.10.0
func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
UpdateCommentsMigrationsByType updates comments' migrations information via given git service type and original id and poster id
func UpdateIssueDeadline ¶ added in v1.5.0
func UpdateIssueDeadline(issue *Issue, deadlineUnix timeutil.TimeStamp, doer *user_model.User) (err error)
UpdateIssueDeadline updates an issue deadline and adds comments. Setting a deadline to 0 means deleting it.
func UpdateIssueMentions ¶
UpdateIssueMentions updates issue-user relations for mentioned users.
func UpdateIssueUserByRead ¶
UpdateIssueUserByRead updates issue-user relation for reading.
func UpdateIssueUsersByMentions ¶
UpdateIssueUsersByMentions updates issue-user pairs by mentioning.
func UpdateIssuesMigrationsByType ¶ added in v1.10.0
func UpdateIssuesMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, posterID int64) error
UpdateIssuesMigrationsByType updates all migrated repositories' issues from gitServiceType to replace originalAuthorID to posterID
func UpdateMigrationsByType ¶ added in v1.10.0
func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error
UpdateMigrationsByType updates all migrated repositories' posterid from gitServiceType to replace originalAuthorID to posterID
func UpdateMilestone ¶
UpdateMilestone updates information of given milestone.
func UpdateNotificationStatuses ¶ added in v1.4.0
func UpdateNotificationStatuses(user *user_model.User, currentStatus, desiredStatus NotificationStatus) error
UpdateNotificationStatuses updates the statuses of all of a user's notifications that are of the currentStatus type to the desiredStatus
func UpdateProject ¶ added in v1.13.0
UpdateProject updates project properties
func UpdateProjectBoard ¶ added in v1.13.0
func UpdateProjectBoard(board *ProjectBoard) error
UpdateProjectBoard updates a project board
func UpdateProjectBoardSorting ¶ added in v1.14.0
func UpdateProjectBoardSorting(bs ProjectBoardList) error
UpdateProjectBoardSorting update project board sorting
func UpdateProtectBranch ¶ added in v1.3.0
func UpdateProtectBranch(repo *repo_model.Repository, protectBranch *ProtectedBranch, opts WhitelistOptions) (err error)
UpdateProtectBranch saves branch protection options of repository. If ID is 0, it creates a new record. Otherwise, updates existing record. This function also performs check if whitelist user and team's IDs have been changed to avoid unnecessary whitelist delete and regenerate.
func UpdateProtectedTag ¶ added in v1.15.0
func UpdateProtectedTag(pt *ProtectedTag) error
UpdateProtectedTag updates the protected tag
func UpdateReactionsMigrationsByType ¶ added in v1.12.0
func UpdateReactionsMigrationsByType(gitServiceType api.GitServiceType, originalAuthorID string, userID int64) error
UpdateReactionsMigrationsByType updates all migrated repositories' reactions from gitServiceType to replace originalAuthorID to posterID
func UpdateRelease ¶
UpdateRelease updates all columns of a release
func UpdateReleasesMigrationsByType ¶ added in v1.10.0
func UpdateReleasesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error
UpdateReleasesMigrationsByType updates all migrated repositories' releases from gitServiceType to replace originalAuthorID to posterID
func UpdateRepoSize ¶ added in v1.16.0
func UpdateRepoSize(ctx context.Context, repo *repo_model.Repository) error
UpdateRepoSize updates the repository size, calculating it using util.GetDirectorySize
func UpdateRepository ¶
func UpdateRepository(repo *repo_model.Repository, visibilityChanged bool) (err error)
UpdateRepository updates a repository
func UpdateRepositoryCtx ¶ added in v1.12.0
func UpdateRepositoryCtx(ctx context.Context, repo *repo_model.Repository, visibilityChanged bool) error
UpdateRepositoryCtx updates a repository with db context
func UpdateReviewsMigrationsByType ¶ added in v1.12.0
func UpdateReviewsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
UpdateReviewsMigrationsByType updates reviews' migrations information via given git service type and original id and poster id
func UpdateTeam ¶
UpdateTeam updates information of team.
func UpdateTeamUnits ¶ added in v1.5.0
UpdateTeamUnits updates a teams's units
func UploadLocalPath ¶
UploadLocalPath returns where uploads is stored in local file system based on given UUID.
func UsersInTeamsCount ¶ added in v1.7.0
UsersInTeamsCount counts the number of users which are in userIDs and teamIDs
Types ¶
type Access ¶
type Access struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"UNIQUE(s)"` RepoID int64 `xorm:"UNIQUE(s)"` Mode perm.AccessMode }
Access represents the highest access level of a user to the repository. The only access type that is not in this table is the real owner of a repository. In case of an organization repository, the members of the owners team are in this table.
type AccessToken ¶
type AccessToken struct { ID int64 `xorm:"pk autoincr"` UID int64 `xorm:"INDEX"` Name string Token string `xorm:"-"` TokenHash string `xorm:"UNIQUE"` // sha256 of token TokenSalt string TokenLastEight string `xorm:"token_last_eight"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` HasRecentActivity bool `xorm:"-"` HasUsed bool `xorm:"-"` }
AccessToken represents a personal access token.
func GetAccessTokenBySHA ¶
func GetAccessTokenBySHA(token string) (*AccessToken, error)
GetAccessTokenBySHA returns access token by given token value
func ListAccessTokens ¶
func ListAccessTokens(opts ListAccessTokensOptions) ([]*AccessToken, error)
ListAccessTokens returns a list of access tokens belongs to given user.
func (*AccessToken) AfterLoad ¶ added in v1.3.0
func (t *AccessToken) AfterLoad()
AfterLoad is invoked from XORM after setting the values of all fields of this object.
type AccessibleReposEnvironment ¶ added in v1.1.0
type AccessibleReposEnvironment interface { CountRepos() (int64, error) RepoIDs(page, pageSize int) ([]int64, error) Repos(page, pageSize int) ([]*repo_model.Repository, error) MirrorRepos() ([]*repo_model.Repository, error) AddKeyword(keyword string) SetSort(db.SearchOrderBy) }
AccessibleReposEnvironment operations involving the repositories that are accessible to a particular user
type Action ¶
type Action struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"INDEX"` // Receiver user id. OpType ActionType ActUserID int64 `xorm:"INDEX"` // Action user id. ActUser *user_model.User `xorm:"-"` RepoID int64 `xorm:"INDEX"` Repo *repo_model.Repository `xorm:"-"` CommentID int64 `xorm:"INDEX"` Comment *Comment `xorm:"-"` IsDeleted bool `xorm:"INDEX NOT NULL DEFAULT false"` RefName string IsPrivate bool `xorm:"INDEX NOT NULL DEFAULT false"` Content string `xorm:"TEXT"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` }
Action represents user operation type and other information to repository. It implemented interface base.Actioner so that can be used in template render.
func GetFeeds ¶
func GetFeeds(opts GetFeedsOptions) ([]*Action, error)
GetFeeds returns actions according to the provided options
func (*Action) GetActFullName ¶ added in v1.6.0
GetActFullName gets the action's user full name.
func (*Action) GetActUserName ¶
GetActUserName gets the action's user name.
func (*Action) GetCommentLink ¶ added in v1.2.0
GetCommentLink returns link to action comment.
func (*Action) GetContent ¶
GetContent returns the action's content.
func (*Action) GetDisplayName ¶ added in v1.9.0
GetDisplayName gets the action's display name based on DEFAULT_SHOW_FULL_NAME, or falls back to the username if it is blank.
func (*Action) GetDisplayNameTitle ¶ added in v1.9.0
GetDisplayNameTitle gets the action's display name used for the title (tooltip) based on DEFAULT_SHOW_FULL_NAME
func (*Action) GetIssueContent ¶
GetIssueContent returns the content of first issue associated with this action.
func (*Action) GetIssueInfos ¶
GetIssueInfos returns a list of issues associated with the action.
func (*Action) GetIssueTitle ¶
GetIssueTitle returns the title of first issue associated with the action.
func (*Action) GetOpType ¶
func (a *Action) GetOpType() ActionType
GetOpType gets the ActionType of this action.
func (*Action) GetRefLink ¶ added in v1.16.0
GetRefLink returns the action's ref link.
func (*Action) GetRepoLink ¶
GetRepoLink returns relative link to action repository.
func (*Action) GetRepoName ¶
GetRepoName returns the name of the action repository.
func (*Action) GetRepoPath ¶
GetRepoPath returns the virtual path to the action repository.
func (*Action) GetRepoUserName ¶
GetRepoUserName returns the name of the action repository owner.
func (*Action) LoadActUser ¶ added in v1.14.0
func (a *Action) LoadActUser()
LoadActUser loads a.ActUser
func (*Action) ShortActUserName ¶
ShortActUserName gets the action's user name trimmed to max 20 chars.
func (*Action) ShortRepoName ¶
ShortRepoName returns the name of the action repository trimmed to max 33 chars.
func (*Action) ShortRepoPath ¶
ShortRepoPath returns the virtual path to the action repository trimmed to max 20 + 1 + 33 chars.
func (*Action) ShortRepoUserName ¶
ShortRepoUserName returns the name of the action repository owner trimmed to max 20 chars.
type ActionList ¶ added in v1.4.0
type ActionList []*Action
ActionList defines a list of actions
func (ActionList) LoadAttributes ¶ added in v1.4.0
func (actions ActionList) LoadAttributes() error
LoadAttributes loads attributes of the actions
func (ActionList) LoadRepositories ¶ added in v1.4.0
func (actions ActionList) LoadRepositories() ([]*repo_model.Repository, error)
LoadRepositories loads actions' all repositories
func (ActionList) LoadUsers ¶ added in v1.4.0
func (actions ActionList) LoadUsers() ([]*user_model.User, error)
LoadUsers loads actions' all users
type ActionType ¶
type ActionType int
ActionType represents the type of an action.
const ( ActionCreateRepo ActionType = iota + 1 // 1 ActionRenameRepo // 2 ActionStarRepo // 3 ActionWatchRepo // 4 ActionCommitRepo // 5 ActionCreateIssue // 6 ActionCreatePullRequest // 7 ActionTransferRepo // 8 ActionPushTag // 9 ActionCommentIssue // 10 ActionMergePullRequest // 11 ActionCloseIssue // 12 ActionReopenIssue // 13 ActionClosePullRequest // 14 ActionReopenPullRequest // 15 ActionDeleteTag // 16 ActionDeleteBranch // 17 ActionMirrorSyncPush // 18 ActionMirrorSyncCreate // 19 ActionMirrorSyncDelete // 20 ActionApprovePullRequest // 21 ActionRejectPullRequest // 22 ActionCommentPull // 23 ActionPublishRelease // 24 ActionPullReviewDismissed // 25 ActionPullRequestReadyForReview // 26 )
Possible action types.
type ActivityAuthorData ¶ added in v1.9.0
type ActivityAuthorData struct { Name string `json:"name"` Login string `json:"login"` AvatarLink string `json:"avatar_link"` HomeLink string `json:"home_link"` Commits int64 `json:"commits"` }
ActivityAuthorData represents statistical git commit count data
func GetActivityStatsTopAuthors ¶ added in v1.9.0
func GetActivityStatsTopAuthors(repo *repo_model.Repository, timeFrom time.Time, count int) ([]*ActivityAuthorData, error)
GetActivityStatsTopAuthors returns top author stats for git commits for all branches
type ActivityStats ¶ added in v1.3.0
type ActivityStats struct { OpenedPRs PullRequestList OpenedPRAuthorCount int64 MergedPRs PullRequestList MergedPRAuthorCount int64 OpenedIssues IssueList OpenedIssueAuthorCount int64 ClosedIssues IssueList ClosedIssueAuthorCount int64 UnresolvedIssues IssueList PublishedReleases []*Release PublishedReleaseAuthorCount int64 Code *git.CodeActivityStats }
ActivityStats represets issue and pull request information.
func GetActivityStats ¶ added in v1.3.0
func GetActivityStats(repo *repo_model.Repository, timeFrom time.Time, releases, issues, prs, code bool) (*ActivityStats, error)
GetActivityStats return stats for repository at given time range
func (*ActivityStats) ActiveIssueCount ¶ added in v1.3.0
func (stats *ActivityStats) ActiveIssueCount() int
ActiveIssueCount returns total active issue count
func (*ActivityStats) ActivePRCount ¶ added in v1.3.0
func (stats *ActivityStats) ActivePRCount() int
ActivePRCount returns total active pull request count
func (*ActivityStats) ClosedIssueCount ¶ added in v1.3.0
func (stats *ActivityStats) ClosedIssueCount() int
ClosedIssueCount returns closed issue count
func (*ActivityStats) ClosedIssuePerc ¶ added in v1.3.0
func (stats *ActivityStats) ClosedIssuePerc() int
ClosedIssuePerc returns closed issue count percent from total active
func (*ActivityStats) FillIssues ¶ added in v1.3.0
func (stats *ActivityStats) FillIssues(repoID int64, fromTime time.Time) error
FillIssues returns issue information for activity page
func (*ActivityStats) FillPullRequests ¶ added in v1.3.0
func (stats *ActivityStats) FillPullRequests(repoID int64, fromTime time.Time) error
FillPullRequests returns pull request information for activity page
func (*ActivityStats) FillReleases ¶ added in v1.3.0
func (stats *ActivityStats) FillReleases(repoID int64, fromTime time.Time) error
FillReleases returns release information for activity page
func (*ActivityStats) FillUnresolvedIssues ¶ added in v1.3.0
func (stats *ActivityStats) FillUnresolvedIssues(repoID int64, fromTime time.Time, issues, prs bool) error
FillUnresolvedIssues returns unresolved issue and pull request information for activity page
func (*ActivityStats) MergedPRCount ¶ added in v1.3.0
func (stats *ActivityStats) MergedPRCount() int
MergedPRCount returns merged pull request count
func (*ActivityStats) MergedPRPerc ¶ added in v1.3.0
func (stats *ActivityStats) MergedPRPerc() int
MergedPRPerc returns merged pull request percent from total active
func (*ActivityStats) OpenedIssueCount ¶ added in v1.3.0
func (stats *ActivityStats) OpenedIssueCount() int
OpenedIssueCount returns open issue count
func (*ActivityStats) OpenedIssuePerc ¶ added in v1.3.0
func (stats *ActivityStats) OpenedIssuePerc() int
OpenedIssuePerc returns open issue count percent from total active
func (*ActivityStats) OpenedPRCount ¶ added in v1.3.0
func (stats *ActivityStats) OpenedPRCount() int
OpenedPRCount returns opened pull request count
func (*ActivityStats) OpenedPRPerc ¶ added in v1.3.0
func (stats *ActivityStats) OpenedPRPerc() int
OpenedPRPerc returns opened pull request percents from total active
func (*ActivityStats) PublishedReleaseCount ¶ added in v1.3.0
func (stats *ActivityStats) PublishedReleaseCount() int
PublishedReleaseCount returns published release count
func (*ActivityStats) UnresolvedIssueCount ¶ added in v1.3.0
func (stats *ActivityStats) UnresolvedIssueCount() int
UnresolvedIssueCount returns unresolved issue and pull request count
type CodeComments ¶ added in v1.6.0
CodeComments represents comments on code by using this structure: FILENAME -> LINE (+ == proposed; - == previous) -> COMMENTS
func FetchCodeComments ¶ added in v1.6.0
func FetchCodeComments(issue *Issue, currentUser *user_model.User) (CodeComments, error)
FetchCodeComments will return a 2d-map: ["Path"]["Line"] = Comments at line
type Collaboration ¶
type Collaboration struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` UserID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` Mode perm.AccessMode `xorm:"DEFAULT 2 NOT NULL"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` }
Collaboration represent the relation between an individual and a repository.
type Collaborator ¶
type Collaborator struct { *user_model.User Collaboration *Collaboration }
Collaborator represents a user with collaboration details.
func GetCollaborators ¶ added in v1.16.0
func GetCollaborators(repoID int64, listOptions db.ListOptions) ([]*Collaborator, error)
GetCollaborators returns the collaborators for a repository
type Comment ¶
type Comment struct { ID int64 `xorm:"pk autoincr"` Type CommentType `xorm:"INDEX"` PosterID int64 `xorm:"INDEX"` Poster *user_model.User `xorm:"-"` OriginalAuthor string OriginalAuthorID int64 IssueID int64 `xorm:"INDEX"` Issue *Issue `xorm:"-"` LabelID int64 Label *Label `xorm:"-"` AddedLabels []*Label `xorm:"-"` RemovedLabels []*Label `xorm:"-"` OldProjectID int64 ProjectID int64 OldProject *Project `xorm:"-"` Project *Project `xorm:"-"` OldMilestoneID int64 MilestoneID int64 OldMilestone *Milestone `xorm:"-"` Milestone *Milestone `xorm:"-"` TimeID int64 Time *TrackedTime `xorm:"-"` AssigneeID int64 RemovedAssignee bool Assignee *user_model.User `xorm:"-"` AssigneeTeamID int64 `xorm:"NOT NULL DEFAULT 0"` AssigneeTeam *Team `xorm:"-"` ResolveDoerID int64 ResolveDoer *user_model.User `xorm:"-"` OldTitle string NewTitle string OldRef string NewRef string DependentIssueID int64 DependentIssue *Issue `xorm:"-"` CommitID int64 Line int64 // - previous line / + proposed line TreePath string Content string `xorm:"LONGTEXT"` RenderedContent string `xorm:"-"` // Path represents the 4 lines of code cemented by this comment Patch string `xorm:"-"` PatchQuoted string `xorm:"LONGTEXT patch"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` // Reference issue in commit message CommitSHA string `xorm:"VARCHAR(40)"` Attachments []*repo_model.Attachment `xorm:"-"` Reactions ReactionList `xorm:"-"` // For view issue page. ShowRole RoleDescriptor `xorm:"-"` Review *Review `xorm:"-"` ReviewID int64 `xorm:"index"` Invalidated bool // Reference an issue or pull from another comment, issue or PR // All information is about the origin of the reference RefRepoID int64 `xorm:"index"` // Repo where the referencing RefIssueID int64 `xorm:"index"` RefCommentID int64 `xorm:"index"` // 0 if origin is Issue title or content (or PR's) RefAction references.XRefAction `xorm:"SMALLINT"` // What happens if RefIssueID resolves RefIsPull bool RefRepo *repo_model.Repository `xorm:"-"` RefIssue *Issue `xorm:"-"` RefComment *Comment `xorm:"-"` Commits []*SignCommitWithStatuses `xorm:"-"` OldCommit string `xorm:"-"` NewCommit string `xorm:"-"` CommitsNum int64 `xorm:"-"` IsForcePush bool `xorm:"-"` }
Comment represents a comment in commit and issue page.
func AddReviewRequest ¶ added in v1.12.0
func AddReviewRequest(issue *Issue, reviewer, doer *user_model.User) (*Comment, error)
AddReviewRequest add a review request from one reviewer
func AddTeamReviewRequest ¶ added in v1.13.0
AddTeamReviewRequest add a review request from one team
func CreateComment ¶
func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error)
CreateComment creates comment of issue or commit.
func CreatePushPullComment ¶ added in v1.13.0
func CreatePushPullComment(pusher *user_model.User, pr *PullRequest, oldCommitID, newCommitID string) (comment *Comment, err error)
CreatePushPullComment create push code to pull base comment
func FetchCodeCommentsByLine ¶ added in v1.14.0
func FetchCodeCommentsByLine(issue *Issue, currentUser *user_model.User, treePath string, line int64) ([]*Comment, error)
FetchCodeCommentsByLine fetches the code comments for a given treePath and line number
func FindComments ¶ added in v1.2.0
func FindComments(opts *FindCommentsOptions) ([]*Comment, error)
FindComments returns all comments according options
func GetCommentByID ¶
GetCommentByID returns the comment by given ID.
func RemoveReviewRequest ¶ added in v1.12.0
func RemoveReviewRequest(issue *Issue, reviewer, doer *user_model.User) (*Comment, error)
RemoveReviewRequest remove a review request from one reviewer
func RemoveTeamReviewRequest ¶ added in v1.13.0
RemoveTeamReviewRequest remove a review request from one team
func UpdateIssueByAPI ¶ added in v1.10.2
func UpdateIssueByAPI(issue *Issue, doer *user_model.User) (statusChangeComment *Comment, titleChanged bool, err error)
UpdateIssueByAPI updates all allowed fields of given issue. If the issue status is changed a statusChangeComment is returned similarly if the title is changed the titleChanged bool is set to true
func (*Comment) AfterDelete ¶
func (c *Comment) AfterDelete()
AfterDelete is invoked from XORM after the object is deleted.
func (*Comment) AfterLoad ¶ added in v1.3.0
AfterLoad is invoked from XORM after setting the values of all fields of this object.
func (*Comment) BeforeInsert ¶
func (c *Comment) BeforeInsert()
BeforeInsert will be invoked by XORM before inserting a record
func (*Comment) BeforeUpdate ¶
func (c *Comment) BeforeUpdate()
BeforeUpdate will be invoked by XORM before updating a record
func (*Comment) CheckInvalidation ¶ added in v1.6.0
func (c *Comment) CheckInvalidation(repo *git.Repository, doer *user_model.User, branch string) error
CheckInvalidation checks if the line of code comment got changed by another commit. If the line got changed the comment is going to be invalidated.
func (*Comment) CodeCommentURL ¶ added in v1.6.0
CodeCommentURL returns the url to a comment in code
func (*Comment) DiffSide ¶ added in v1.6.0
DiffSide returns "previous" if Comment.Line is a LOC of the previous changes and "proposed" if it is a LOC of the proposed changes.
func (*Comment) IsResolved ¶ added in v1.12.0
IsResolved check if an code comment is resolved
func (*Comment) LoadAssigneeUserAndTeam ¶ added in v1.13.0
LoadAssigneeUserAndTeam if comment.Type is CommentTypeAssignees, then load assignees
func (*Comment) LoadAttachments ¶ added in v1.7.0
LoadAttachments loads attachments (it never returns error, the error during `GetAttachmentsByCommentIDCtx` is ignored)
func (*Comment) LoadDepIssueDetails ¶ added in v1.6.0
LoadDepIssueDetails loads Dependent Issue Details
func (*Comment) LoadLabel ¶ added in v1.1.0
LoadLabel if comment.Type is CommentTypeLabel, then load Label
func (*Comment) LoadMilestone ¶ added in v1.1.0
LoadMilestone if comment.Type is CommentTypeMilestone, then load milestone
func (*Comment) LoadPoster ¶ added in v1.7.0
LoadPoster loads comment poster
func (*Comment) LoadProject ¶ added in v1.13.0
LoadProject if comment.Type is CommentTypeProject, then load project.
func (*Comment) LoadPushCommits ¶ added in v1.13.0
LoadPushCommits Load push commits
func (*Comment) LoadReactions ¶ added in v1.4.0
func (c *Comment) LoadReactions(repo *repo_model.Repository) error
LoadReactions loads comment reactions
func (*Comment) LoadRefComment ¶ added in v1.10.0
LoadRefComment loads comment that created this reference from database
func (*Comment) LoadRefIssue ¶ added in v1.10.0
LoadRefIssue loads comment that created this reference from database
func (*Comment) LoadResolveDoer ¶ added in v1.12.0
LoadResolveDoer if comment.Type is CommentTypeCode and ResolveDoerID not zero, then load resolveDoer
func (*Comment) LoadReview ¶ added in v1.6.0
LoadReview loads the associated review
func (*Comment) LoadTime ¶ added in v1.14.0
LoadTime loads the associated time for a CommentTypeAddTimeManual
func (*Comment) RefCommentHTMLURL ¶ added in v1.10.0
RefCommentHTMLURL returns the HTML URL for the comment that created this reference
func (*Comment) RefIssueHTMLURL ¶ added in v1.10.0
RefIssueHTMLURL returns the HTML URL of the issue where this reference was created
func (*Comment) RefIssueIdent ¶ added in v1.10.0
RefIssueIdent returns the user friendly identity (e.g. "#1234") of the issue where this reference was created
func (*Comment) RefIssueTitle ¶ added in v1.10.0
RefIssueTitle returns the title of the issue where this reference was created
func (*Comment) UnsignedLine ¶ added in v1.6.0
UnsignedLine returns the LOC of the code comment without + or -
func (*Comment) UpdateAttachments ¶ added in v1.11.0
UpdateAttachments update attachments by UUIDs for the comment
type CommentList ¶ added in v1.7.0
type CommentList []*Comment
CommentList defines a list of comments
func (CommentList) Issues ¶ added in v1.9.0
func (comments CommentList) Issues() IssueList
Issues returns all the issues of comments
func (CommentList) LoadAttachments ¶ added in v1.9.0
func (comments CommentList) LoadAttachments() error
LoadAttachments loads attachments
func (CommentList) LoadAttributes ¶ added in v1.9.0
func (comments CommentList) LoadAttributes() error
LoadAttributes loads attributes of the comments, except for attachments and comments
func (CommentList) LoadIssues ¶ added in v1.9.0
func (comments CommentList) LoadIssues() error
LoadIssues loads issues of comments
func (CommentList) LoadPosters ¶ added in v1.7.0
func (comments CommentList) LoadPosters() error
LoadPosters loads posters
type CommentType ¶
type CommentType int
CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
const ( // 0 Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0) CommentTypeComment CommentType = iota CommentTypeReopen // 1 CommentTypeClose // 2 // 3 References. CommentTypeIssueRef // 4 Reference from a commit (not part of a pull request) CommentTypeCommitRef // 5 Reference from a comment CommentTypeCommentRef // 6 Reference from a pull request CommentTypePullRef // 7 Labels changed CommentTypeLabel // 8 Milestone changed CommentTypeMilestone // 9 Assignees changed CommentTypeAssignees // 10 Change Title CommentTypeChangeTitle // 11 Delete Branch CommentTypeDeleteBranch // 12 Start a stopwatch for time tracking CommentTypeStartTracking // 13 Stop a stopwatch for time tracking CommentTypeStopTracking // 14 Add time manual for time tracking CommentTypeAddTimeManual // 15 Cancel a stopwatch for time tracking CommentTypeCancelTracking // 16 Added a due date CommentTypeAddedDeadline // 17 Modified the due date CommentTypeModifiedDeadline // 18 Removed a due date CommentTypeRemovedDeadline // 19 Dependency added CommentTypeAddDependency // 20 Dependency removed CommentTypeRemoveDependency // 21 Comment a line of code CommentTypeCode // 22 Reviews a pull request by giving general feedback CommentTypeReview // 23 Lock an issue, giving only collaborators access CommentTypeLock // 24 Unlocks a previously locked issue CommentTypeUnlock // 25 Change pull request's target branch CommentTypeChangeTargetBranch // 26 Delete time manual for time tracking CommentTypeDeleteTimeManual // 27 add or remove Request from one CommentTypeReviewRequest // 28 merge pull request CommentTypeMergePull // 29 push to PR head branch CommentTypePullPush // 30 Project changed CommentTypeProject // 31 Project board changed CommentTypeProjectBoard // 32 Dismiss Review CommentTypeDismissReview // 33 Change issue ref CommentTypeChangeIssueRef )
Enumerate all the comment types
const (
CommentTypeUnknown CommentType = -1
)
define unknown comment type
func (CommentType) String ¶ added in v1.16.0
func (t CommentType) String() string
type CommitStatus ¶ added in v1.2.0
type CommitStatus struct { ID int64 `xorm:"pk autoincr"` Index int64 `xorm:"INDEX UNIQUE(repo_sha_index)"` RepoID int64 `xorm:"INDEX UNIQUE(repo_sha_index)"` Repo *repo_model.Repository `xorm:"-"` State api.CommitStatusState `xorm:"VARCHAR(7) NOT NULL"` SHA string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_index)"` TargetURL string `xorm:"TEXT"` Description string `xorm:"TEXT"` ContextHash string `xorm:"char(40) index"` Context string `xorm:"TEXT"` Creator *user_model.User `xorm:"-"` CreatorID int64 CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` }
CommitStatus holds a single Status of a single Commit
func CalcCommitStatus ¶ added in v1.3.0
func CalcCommitStatus(statuses []*CommitStatus) *CommitStatus
CalcCommitStatus returns commit status state via some status, the commit statues should order by id desc
func GetCommitStatuses ¶ added in v1.2.0
func GetCommitStatuses(repo *repo_model.Repository, sha string, opts *CommitStatusOptions) ([]*CommitStatus, int64, error)
GetCommitStatuses returns all statuses for a given commit.
func GetLatestCommitStatus ¶ added in v1.2.0
func GetLatestCommitStatus(repoID int64, sha string, listOptions db.ListOptions) ([]*CommitStatus, int64, error)
GetLatestCommitStatus returns all statuses with a unique context for a given commit.
func (*CommitStatus) APIURL ¶ added in v1.2.0
func (status *CommitStatus) APIURL() string
APIURL returns the absolute APIURL to this commit-status.
type CommitStatusIndex ¶ added in v1.16.0
type CommitStatusIndex struct { ID int64 RepoID int64 `xorm:"unique(repo_sha)"` SHA string `xorm:"unique(repo_sha)"` MaxIndex int64 `xorm:"index"` }
CommitStatusIndex represents a table for commit status index
type CommitStatusOptions ¶ added in v1.10.0
type CommitStatusOptions struct { db.ListOptions State string SortType string }
CommitStatusOptions holds the options for query commit statuses
type ContentEmptyErr ¶ added in v1.11.0
type ContentEmptyErr struct{}
ContentEmptyErr represents an content empty error
func (ContentEmptyErr) Error ¶ added in v1.11.0
func (ContentEmptyErr) Error() string
type CreateCommentOptions ¶
type CreateCommentOptions struct { Type CommentType Doer *user_model.User Repo *repo_model.Repository Issue *Issue Label *Label DependentIssueID int64 OldMilestoneID int64 MilestoneID int64 OldProjectID int64 ProjectID int64 TimeID int64 AssigneeID int64 AssigneeTeamID int64 RemovedAssignee bool OldTitle string NewTitle string OldRef string NewRef string CommitID int64 CommitSHA string Patch string LineNum int64 TreePath string ReviewID int64 Content string Attachments []string // UUIDs of attachments RefRepoID int64 RefIssueID int64 RefCommentID int64 RefAction references.XRefAction RefIsPull bool IsForcePush bool Invalidated bool }
CreateCommentOptions defines options for creating comment
type CreateRepoOptions ¶
type CreateRepoOptions struct { Name string Description string OriginalURL string GitServiceType api.GitServiceType Gitignores string IssueLabels string License string Readme string DefaultBranch string IsPrivate bool IsMirror bool IsTemplate bool AutoInit bool Status repo_model.RepositoryStatus TrustModel repo_model.TrustModelType MirrorInterval string }
CreateRepoOptions contains the create repository options
type CreateReviewOptions ¶ added in v1.6.0
type CreateReviewOptions struct { Content string Type ReviewType Issue *Issue Reviewer *user_model.User ReviewerTeam *Team Official bool CommitID string Stale bool }
CreateReviewOptions represent the options to create a review. Type, Issue and Reviewer are required.
type DeletedBranch ¶ added in v1.3.0
type DeletedBranch struct { ID int64 `xorm:"pk autoincr"` RepoID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` Name string `xorm:"UNIQUE(s) NOT NULL"` Commit string `xorm:"UNIQUE(s) NOT NULL"` DeletedByID int64 `xorm:"INDEX"` DeletedBy *user_model.User `xorm:"-"` DeletedUnix timeutil.TimeStamp `xorm:"INDEX created"` }
DeletedBranch struct
func GetDeletedBranchByID ¶ added in v1.16.0
func GetDeletedBranchByID(repoID, id int64) (*DeletedBranch, error)
GetDeletedBranchByID get a deleted branch by its ID
func GetDeletedBranches ¶ added in v1.16.0
func GetDeletedBranches(repoID int64) ([]*DeletedBranch, error)
GetDeletedBranches returns all the deleted branches
func (*DeletedBranch) LoadUser ¶ added in v1.3.0
func (deletedBranch *DeletedBranch) LoadUser()
LoadUser loads the user that deleted the branch When there's no user found it returns a user_model.NewGhostUser
type DependencyInfo ¶ added in v1.11.0
type DependencyInfo struct { Issue `xorm:"extends"` repo_model.Repository `xorm:"extends"` }
DependencyInfo represents high level information about an issue which is a dependency of another issue.
type DependencyType ¶ added in v1.6.0
type DependencyType int
DependencyType Defines Dependency Type Constants
const ( DependencyTypeBlockedBy DependencyType = iota DependencyTypeBlocking )
Define Dependency Types
type ErrAccessTokenEmpty ¶
type ErrAccessTokenEmpty struct{}
ErrAccessTokenEmpty represents a "AccessTokenEmpty" kind of error.
func (ErrAccessTokenEmpty) Error ¶
func (err ErrAccessTokenEmpty) Error() string
type ErrAccessTokenNotExist ¶
type ErrAccessTokenNotExist struct {
Token string
}
ErrAccessTokenNotExist represents a "AccessTokenNotExist" kind of error.
func (ErrAccessTokenNotExist) Error ¶
func (err ErrAccessTokenNotExist) Error() string
type ErrBranchAlreadyExists ¶ added in v1.3.0
type ErrBranchAlreadyExists struct {
BranchName string
}
ErrBranchAlreadyExists represents an error that branch with such name already exists.
func (ErrBranchAlreadyExists) Error ¶ added in v1.3.0
func (err ErrBranchAlreadyExists) Error() string
type ErrBranchDoesNotExist ¶ added in v1.13.0
type ErrBranchDoesNotExist struct {
BranchName string
}
ErrBranchDoesNotExist represents an error that branch with such name does not exist.
func (ErrBranchDoesNotExist) Error ¶ added in v1.13.0
func (err ErrBranchDoesNotExist) Error() string
type ErrBranchNameConflict ¶ added in v1.3.0
type ErrBranchNameConflict struct {
BranchName string
}
ErrBranchNameConflict represents an error that branch name conflicts with other branch.
func (ErrBranchNameConflict) Error ¶ added in v1.3.0
func (err ErrBranchNameConflict) Error() string
type ErrBranchesEqual ¶ added in v1.11.0
ErrBranchesEqual represents an error that branch name conflicts with other branch.
func (ErrBranchesEqual) Error ¶ added in v1.11.0
func (err ErrBranchesEqual) Error() string
type ErrCircularDependency ¶ added in v1.6.0
ErrCircularDependency represents a "DependencyCircular" kind of error.
func (ErrCircularDependency) Error ¶ added in v1.6.0
func (err ErrCircularDependency) Error() string
type ErrCommentNotExist ¶
ErrCommentNotExist represents a "CommentNotExist" kind of error.
func (ErrCommentNotExist) Error ¶
func (err ErrCommentNotExist) Error() string
type ErrCommitIDDoesNotMatch ¶ added in v1.9.0
ErrCommitIDDoesNotMatch represents a "CommitIDDoesNotMatch" kind of error.
func (ErrCommitIDDoesNotMatch) Error ¶ added in v1.9.0
func (err ErrCommitIDDoesNotMatch) Error() string
type ErrDependenciesLeft ¶ added in v1.6.0
type ErrDependenciesLeft struct {
IssueID int64
}
ErrDependenciesLeft represents an error where the issue you're trying to close still has dependencies left.
func (ErrDependenciesLeft) Error ¶ added in v1.6.0
func (err ErrDependenciesLeft) Error() string
type ErrDependencyExists ¶ added in v1.6.0
ErrDependencyExists represents a "DependencyAlreadyExists" kind of error.
func (ErrDependencyExists) Error ¶ added in v1.6.0
func (err ErrDependencyExists) Error() string
type ErrDependencyNotExists ¶ added in v1.6.0
ErrDependencyNotExists represents a "DependencyAlreadyExists" kind of error.
func (ErrDependencyNotExists) Error ¶ added in v1.6.0
func (err ErrDependencyNotExists) Error() string
type ErrFilePathInvalid ¶ added in v1.9.0
ErrFilePathInvalid represents a "FilePathInvalid" kind of error.
func (ErrFilePathInvalid) Error ¶ added in v1.9.0
func (err ErrFilePathInvalid) Error() string
type ErrFilePathProtected ¶ added in v1.12.0
ErrFilePathProtected represents a "FilePathProtected" kind of error.
func (ErrFilePathProtected) Error ¶ added in v1.12.0
func (err ErrFilePathProtected) Error() string
type ErrFilenameInvalid ¶ added in v1.9.0
type ErrFilenameInvalid struct {
Path string
}
ErrFilenameInvalid represents a "FilenameInvalid" kind of error.
func (ErrFilenameInvalid) Error ¶ added in v1.9.0
func (err ErrFilenameInvalid) Error() string
type ErrForbiddenIssueReaction ¶ added in v1.11.0
type ErrForbiddenIssueReaction struct {
Reaction string
}
ErrForbiddenIssueReaction is used when a forbidden reaction was try to created
func (ErrForbiddenIssueReaction) Error ¶ added in v1.11.0
func (err ErrForbiddenIssueReaction) Error() string
type ErrForkAlreadyExist ¶ added in v1.9.0
ErrForkAlreadyExist represents a "ForkAlreadyExist" kind of error.
func (ErrForkAlreadyExist) Error ¶ added in v1.9.0
func (err ErrForkAlreadyExist) Error() string
type ErrInvalidCloneAddr ¶
type ErrInvalidCloneAddr struct { Host string IsURLError bool IsInvalidPath bool IsProtocolInvalid bool IsPermissionDenied bool LocalPath bool NotResolvedIP bool }
ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error.
func (*ErrInvalidCloneAddr) Error ¶
func (err *ErrInvalidCloneAddr) Error() string
type ErrInvalidMergeStyle ¶ added in v1.4.0
type ErrInvalidMergeStyle struct { ID int64 Style repo_model.MergeStyle }
ErrInvalidMergeStyle represents an error if merging with disabled merge strategy
func (ErrInvalidMergeStyle) Error ¶ added in v1.4.0
func (err ErrInvalidMergeStyle) Error() string
type ErrInvalidTagName ¶
type ErrInvalidTagName struct {
TagName string
}
ErrInvalidTagName represents a "InvalidTagName" kind of error.
func (ErrInvalidTagName) Error ¶
func (err ErrInvalidTagName) Error() string
type ErrIssueIsClosed ¶ added in v1.11.0
ErrIssueIsClosed represents a "IssueIsClosed" kind of error.
func (ErrIssueIsClosed) Error ¶ added in v1.11.0
func (err ErrIssueIsClosed) Error() string
type ErrIssueLabelTemplateLoad ¶ added in v1.10.0
ErrIssueLabelTemplateLoad represents a "ErrIssueLabelTemplateLoad" kind of error.
func (ErrIssueLabelTemplateLoad) Error ¶ added in v1.10.0
func (err ErrIssueLabelTemplateLoad) Error() string
type ErrIssueNotExist ¶
ErrIssueNotExist represents a "IssueNotExist" kind of error.
func (ErrIssueNotExist) Error ¶
func (err ErrIssueNotExist) Error() string
type ErrIssueStopwatchAlreadyExist ¶ added in v1.15.7
ErrIssueStopwatchAlreadyExist represents an error that stopwatch is already exist
func (ErrIssueStopwatchAlreadyExist) Error ¶ added in v1.15.7
func (err ErrIssueStopwatchAlreadyExist) Error() string
type ErrIssueStopwatchNotExist ¶ added in v1.15.7
ErrIssueStopwatchNotExist represents an error that stopwatch is not exist
func (ErrIssueStopwatchNotExist) Error ¶ added in v1.15.7
func (err ErrIssueStopwatchNotExist) Error() string
type ErrIssueWasClosed ¶ added in v1.11.0
ErrIssueWasClosed is used when close a closed issue
func (ErrIssueWasClosed) Error ¶ added in v1.11.0
func (err ErrIssueWasClosed) Error() string
type ErrLFSFileLocked ¶ added in v1.11.0
ErrLFSFileLocked represents a "LFSFileLocked" kind of error.
func (ErrLFSFileLocked) Error ¶ added in v1.11.0
func (err ErrLFSFileLocked) Error() string
type ErrLFSLockAlreadyExist ¶ added in v1.4.0
ErrLFSLockAlreadyExist represents a "LFSLockAlreadyExist" kind of error.
func (ErrLFSLockAlreadyExist) Error ¶ added in v1.4.0
func (err ErrLFSLockAlreadyExist) Error() string
type ErrLFSLockNotExist ¶ added in v1.4.0
ErrLFSLockNotExist represents a "LFSLockNotExist" kind of error.
func (ErrLFSLockNotExist) Error ¶ added in v1.4.0
func (err ErrLFSLockNotExist) Error() string
type ErrLFSUnauthorizedAction ¶ added in v1.4.0
type ErrLFSUnauthorizedAction struct {