Documentation ¶
Index ¶
- func AddAssigneeIfNotAssigned(issue *models.Issue, doer *models.User, assigneeID int64) (err error)
- func AddLabel(issue *models.Issue, doer *models.User, label *models.Label) error
- func AddLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error
- func ChangeContent(issue *models.Issue, doer *models.User, content string) (err error)
- func ChangeIssueRef(issue *models.Issue, doer *models.User, ref string) error
- func ChangeMilestoneAssign(issue *models.Issue, doer *models.User, oldMilestoneID int64) (err error)
- func ChangeStatus(issue *models.Issue, doer *models.User, isClosed bool) (err error)
- func ChangeTitle(issue *models.Issue, doer *models.User, title string) (err error)
- func ClearLabels(issue *models.Issue, doer *models.User) (err error)
- func DeleteNotPassedAssignee(issue *models.Issue, doer *models.User, assignees []*models.User) (err error)
- func GetRefEndNamesAndURLs(issues []*models.Issue, repoLink string) (map[int64]string, map[int64]string)
- func IsValidReviewRequest(reviewer, doer *models.User, isAdd bool, issue *models.Issue, ...) error
- func IsValidTeamReviewRequest(reviewer *models.Team, doer *models.User, isAdd bool, issue *models.Issue) error
- func NewIssue(repo *models.Repository, issue *models.Issue, labelIDs []int64, uuids []string, ...) error
- func RemoveLabel(issue *models.Issue, doer *models.User, label *models.Label) error
- func ReplaceLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error
- func ReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.User, isAdd bool) (comment *models.Comment, err error)
- func TeamReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.Team, isAdd bool) (comment *models.Comment, err error)
- func ToggleAssignee(issue *models.Issue, doer *models.User, assigneeID int64) (removed bool, comment *models.Comment, err error)
- func UpdateAssignees(issue *models.Issue, oneAssignee string, multipleAssignees []string, ...) (err error)
- func UpdateIssuesCommit(doer *models.User, repo *models.Repository, commits []*repository.PushCommit, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAssigneeIfNotAssigned ¶ added in v1.11.0
AddAssigneeIfNotAssigned adds an assignee only if he isn't already assigned to the issue. Also checks for access of assigned user
func ChangeContent ¶ added in v1.11.0
ChangeContent changes issue content, as the given user.
func ChangeIssueRef ¶ added in v1.13.0
ChangeIssueRef changes the branch of this issue, as the given user.
func ChangeMilestoneAssign ¶ added in v1.11.0
func ChangeMilestoneAssign(issue *models.Issue, doer *models.User, oldMilestoneID int64) (err error)
ChangeMilestoneAssign changes assignment of milestone for issue.
func ChangeStatus ¶ added in v1.11.0
ChangeStatus changes issue status to open or closed.
func ChangeTitle ¶
ChangeTitle changes the title of this issue, as the given user.
func ClearLabels ¶ added in v1.11.0
ClearLabels clears all of an issue's labels
func DeleteNotPassedAssignee ¶ added in v1.11.0
func DeleteNotPassedAssignee(issue *models.Issue, doer *models.User, assignees []*models.User) (err error)
DeleteNotPassedAssignee deletes all assignees who aren't passed via the "assignees" array
func GetRefEndNamesAndURLs ¶ added in v1.12.0
func GetRefEndNamesAndURLs(issues []*models.Issue, repoLink string) (map[int64]string, map[int64]string)
GetRefEndNamesAndURLs retrieves the ref end names (e.g. refs/heads/branch-name -> branch-name) and their respective URLs.
func IsValidReviewRequest ¶ added in v1.14.0
func IsValidReviewRequest(reviewer, doer *models.User, isAdd bool, issue *models.Issue, permDoer *models.Permission) error
IsValidReviewRequest Check permission for ReviewRequest
func IsValidTeamReviewRequest ¶ added in v1.14.0
func IsValidTeamReviewRequest(reviewer *models.Team, doer *models.User, isAdd bool, issue *models.Issue) error
IsValidTeamReviewRequest Check permission for ReviewRequest Team
func NewIssue ¶
func NewIssue(repo *models.Repository, issue *models.Issue, labelIDs []int64, uuids []string, assigneeIDs []int64) error
NewIssue creates new issue with labels for repository.
func RemoveLabel ¶ added in v1.11.0
RemoveLabel removes a label from issue by given ID.
func ReplaceLabels ¶ added in v1.11.2
ReplaceLabels removes all current labels and add new labels to the issue.
func ReviewRequest ¶ added in v1.12.0
func ReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.User, isAdd bool) (comment *models.Comment, err error)
ReviewRequest add or remove a review request from a user for this PR, and make comment for it.
func TeamReviewRequest ¶ added in v1.13.0
func TeamReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.Team, isAdd bool) (comment *models.Comment, err error)
TeamReviewRequest add or remove a review request from a team for this PR, and make comment for it.
func ToggleAssignee ¶ added in v1.11.0
func ToggleAssignee(issue *models.Issue, doer *models.User, assigneeID int64) (removed bool, comment *models.Comment, err error)
ToggleAssignee changes a user between assigned and not assigned for this issue, and make issue comment for it.
func UpdateAssignees ¶ added in v1.11.0
func UpdateAssignees(issue *models.Issue, oneAssignee string, multipleAssignees []string, doer *models.User) (err error)
UpdateAssignees is a helper function to add or delete one or multiple issue assignee(s) Deleting is done the GitHub way (quote from their api documentation): https://developer.github.com/v3/issues/#edit-an-issue "assignees" (array): Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue.
func UpdateIssuesCommit ¶ added in v1.15.7
func UpdateIssuesCommit(doer *models.User, repo *models.Repository, commits []*repository.PushCommit, branchName string) error
UpdateIssuesCommit checks if issues are manipulated by commit message.
Types ¶
This section is empty.