{"modulePath":"github.com/RedAFD/code-core","version":"v1.14.0-rc8","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package issue\n\n## Functions\n\n```go\nfunc AddAssigneeIfNotAssigned(issue *models.Issue, doer *models.User, assigneeID int64) (err error)\n```\nAddAssigneeIfNotAssigned adds an assignee only if he isn't already assigned to the issue. Also checks for access of assigned user\n\n```go\nfunc AddLabel(issue *models.Issue, doer *models.User, label *models.Label) error\n```\nAddLabel adds a new label to the issue.\n\n```go\nfunc AddLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error\n```\nAddLabels adds a list of new labels to the issue.\n\n```go\nfunc ChangeContent(issue *models.Issue, doer *models.User, content string) (err error)\n```\nChangeContent changes issue content, as the given user.\n\n```go\nfunc ChangeIssueRef(issue *models.Issue, doer *models.User, ref string) error\n```\nChangeIssueRef changes the branch of this issue, as the given user.\n\n```go\nfunc ChangeMilestoneAssign(issue *models.Issue, doer *models.User, oldMilestoneID int64) (err error)\n```\nChangeMilestoneAssign changes assignment of milestone for issue.\n\n```go\nfunc ChangeStatus(issue *models.Issue, doer *models.User, isClosed bool) (err error)\n```\nChangeStatus changes issue status to open or closed.\n\n```go\nfunc ChangeTitle(issue *models.Issue, doer *models.User, title string) (err error)\n```\nChangeTitle changes the title of this issue, as the given user.\n\n```go\nfunc ClearLabels(issue *models.Issue, doer *models.User) (err error)\n```\nClearLabels clears all of an issue's labels\n\n```go\nfunc DeleteNotPassedAssignee(issue *models.Issue, doer *models.User, assignees []*models.User) (err error)\n```\nDeleteNotPassedAssignee deletes all assignees who aren't passed via the \"assignees\" array\n\n```go\nfunc GetRefEndNamesAndURLs(issues []*models.Issue, repoLink string) (map[int64]string, map[int64]string)\n```\nGetRefEndNamesAndURLs retrieves the ref end names (e.g. refs/heads/branch-name -\u003e branch-name) and their respective URLs.\n\n```go\nfunc IsValidReviewRequest(reviewer, doer *models.User, isAdd bool, issue *models.Issue, permDoer *models.Permission) error\n```\nIsValidReviewRequest Check permission for ReviewRequest\n\n```go\nfunc IsValidTeamReviewRequest(reviewer *models.Team, doer *models.User, isAdd bool, issue *models.Issue) error\n```\nIsValidTeamReviewRequest Check permission for ReviewRequest Team\n\n```go\nfunc NewIssue(repo *models.Repository, issue *models.Issue, labelIDs []int64, uuids []string, assigneeIDs []int64) error\n```\nNewIssue creates new issue with labels for repository.\n\n```go\nfunc RemoveLabel(issue *models.Issue, doer *models.User, label *models.Label) error\n```\nRemoveLabel removes a label from issue by given ID.\n\n```go\nfunc ReplaceLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error\n```\nReplaceLabels removes all current labels and add new labels to the issue.\n\n```go\nfunc ReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.User, isAdd bool) (comment *models.Comment, err error)\n```\nReviewRequest add or remove a review request from a user for this PR, and make comment for it.\n\n```go\nfunc TeamReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.Team, isAdd bool) (comment *models.Comment, err error)\n```\nTeamReviewRequest add or remove a review request from a team for this PR, and make comment for it.\n\n```go\nfunc ToggleAssignee(issue *models.Issue, doer *models.User, assigneeID int64) (removed bool, comment *models.Comment, err error)\n```\nToggleAssignee changes a user between assigned and not assigned for this issue, and make issue comment for it.\n\n```go\nfunc UpdateAssignees(issue *models.Issue, oneAssignee string, multipleAssignees []string, doer *models.User) (err error)\n```\nUpdateAssignees 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](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.\n\n","path":"github.com/RedAFD/code-core/services/issue","name":"issue","synopsis":"","isRedistributable":true}
