Documentation ¶
Index ¶
- Variables
- func Action(ctx *context.Context)
- func Activity(ctx *context.Context)
- func ActivityAuthors(ctx *context.Context)
- func AddBoardToProjectPost(ctx *context.Context)
- func AddDependency(ctx *context.Context)
- func AddTeamPost(ctx *context.Context)
- func AddTimeManually(c *context.Context)
- func Branches(ctx *context.Context)
- func CancelStopwatch(c *context.Context)
- func ChangeCollaborationAccessMode(ctx *context.Context)
- func ChangeCommentReaction(ctx *context.Context)
- func ChangeIssueReaction(ctx *context.Context)
- func ChangeMilestoneStatus(ctx *context.Context)
- func ChangeProjectStatus(ctx *context.Context)
- func CleanUpPullRequest(ctx *context.Context)
- func Collaboration(ctx *context.Context)
- func CollaborationPost(ctx *context.Context)
- func Commits(ctx *context.Context)
- func CompareAndPullRequestPost(ctx *context.Context)
- func CompareDiff(ctx *context.Context)
- func Create(ctx *context.Context)
- func CreateBranch(ctx *context.Context)
- func CreateCodeComment(ctx *context.Context)
- func CreatePost(ctx *context.Context)
- func CreateProject(ctx *context.Context)
- func CreateProjectPost(ctx *context.Context, form auth.UserCreateProjectForm)
- func DeleteAttachment(ctx *context.Context)
- func DeleteBranchPost(ctx *context.Context)
- func DeleteCollaboration(ctx *context.Context)
- func DeleteComment(ctx *context.Context)
- func DeleteDeployKey(ctx *context.Context)
- func DeleteFile(ctx *context.Context)
- func DeleteFilePost(ctx *context.Context)
- func DeleteLabel(ctx *context.Context)
- func DeleteMilestone(ctx *context.Context)
- func DeleteProject(ctx *context.Context)
- func DeleteProjectBoard(ctx *context.Context)
- func DeleteRelease(ctx *context.Context)
- func DeleteTag(ctx *context.Context)
- func DeleteTeam(ctx *context.Context)
- func DeleteTime(c *context.Context)
- func DeleteWebhook(ctx *context.Context)
- func DeleteWikiPagePost(ctx *context.Context)
- func DeployKeys(ctx *context.Context)
- func DeployKeysPost(ctx *context.Context)
- func Diff(ctx *context.Context)
- func DiffPreviewPost(ctx *context.Context)
- func DingtalkHooksEditPost(ctx *context.Context)
- func DingtalkHooksNewPost(ctx *context.Context)
- func DiscordHooksEditPost(ctx *context.Context)
- func DiscordHooksNewPost(ctx *context.Context)
- func DismissReview(ctx *context.Context)
- func Download(ctx *context.Context)
- func DownloadByID(ctx *context.Context)
- func DownloadByIDOrLFS(ctx *context.Context)
- func DownloadPullDiff(ctx *context.Context)
- func DownloadPullDiffOrPatch(ctx *context.Context, patch bool)
- func DownloadPullPatch(ctx *context.Context)
- func EditFile(ctx *context.Context)
- func EditFilePost(ctx *context.Context)
- func EditMilestone(ctx *context.Context)
- func EditMilestonePost(ctx *context.Context)
- func EditProject(ctx *context.Context)
- func EditProjectBoard(ctx *context.Context)
- func EditProjectPost(ctx *context.Context)
- func EditRelease(ctx *context.Context)
- func EditReleasePost(ctx *context.Context)
- func EditWiki(ctx *context.Context)
- func EditWikiPost(ctx *context.Context)
- func ExcerptBlob(ctx *context.Context)
- func FeishuHooksEditPost(ctx *context.Context)
- func FeishuHooksNewPost(ctx *context.Context)
- func FileHistory(ctx *context.Context)
- func Fork(ctx *context.Context)
- func ForkPost(ctx *context.Context)
- func Forks(ctx *context.Context)
- func GetActionIssue(ctx *context.Context) *models.Issue
- func GetActiveStopwatch(c *context.Context)
- func GetAttachment(ctx *context.Context)
- func GetClosestParentWithFiles(treePath string, commit *git.Commit) string
- func GetCommentAttachments(ctx *context.Context)
- func GetEditorConfig(ctx *context.Context, treePath string) string
- func GetIdxFile(ctx *context.Context)
- func GetInfoPacks(ctx *context.Context)
- func GetInfoRefs(ctx *context.Context)
- func GetIssueAttachments(ctx *context.Context)
- func GetLooseObject(ctx *context.Context)
- func GetPackFile(ctx *context.Context)
- func GetTextFile(p string) func(*context.Context)
- func GetUniquePatchBranchName(ctx *context.Context) string
- func GitHooks(ctx *context.Context)
- func GitHooksEdit(ctx *context.Context)
- func GitHooksEditPost(ctx *context.Context)
- func GiteaHooksNewPost(ctx *context.Context)
- func GogsHooksEditPost(ctx *context.Context)
- func GogsHooksNewPost(ctx *context.Context)
- func Graph(ctx *context.Context)
- func Home(ctx *context.Context)
- func InitializeLabels(ctx *context.Context)
- func InitiateDownload(ctx *context.Context)
- func IssueStopwatch(c *context.Context)
- func IssueWatch(ctx *context.Context)
- func Issues(ctx *context.Context)
- func LFSAutoAssociate(ctx *context.Context)
- func LFSDelete(ctx *context.Context)
- func LFSFileFind(ctx *context.Context)
- func LFSFileGet(ctx *context.Context)
- func LFSFiles(ctx *context.Context)
- func LFSLockFile(ctx *context.Context)
- func LFSLocks(ctx *context.Context)
- func LFSPointerFiles(ctx *context.Context)
- func LFSUnlock(ctx *context.Context)
- func Labels(ctx *context.Context)
- func LatestRelease(ctx *context.Context)
- func LockIssue(ctx *context.Context)
- func MSTeamsHooksEditPost(ctx *context.Context)
- func MSTeamsHooksNewPost(ctx *context.Context)
- func MatrixHooksEditPost(ctx *context.Context)
- func MatrixHooksNewPost(ctx *context.Context)
- func MergePullRequest(ctx *context.Context)
- func Migrate(ctx *context.Context)
- func MigratePost(ctx *context.Context)
- func MilestoneIssuesAndPulls(ctx *context.Context)
- func Milestones(ctx *context.Context)
- func MoveIssueAcrossBoards(ctx *context.Context)
- func MustAllowPulls(ctx *context.Context)
- func MustAllowUserComment(ctx *context.Context)
- func MustBeAbleToUpload(ctx *context.Context)
- func MustBeEditable(ctx *context.Context)
- func MustBeNotEmpty(ctx *context.Context)
- func MustEnableIssues(ctx *context.Context)
- func MustEnableProjects(ctx *context.Context)
- func MustEnableWiki(ctx *context.Context)
- func NewComment(ctx *context.Context)
- func NewFile(ctx *context.Context)
- func NewFilePost(ctx *context.Context)
- func NewIssue(ctx *context.Context)
- func NewIssueChooseTemplate(ctx *context.Context)
- func NewIssuePost(ctx *context.Context)
- func NewLabel(ctx *context.Context)
- func NewMilestone(ctx *context.Context)
- func NewMilestonePost(ctx *context.Context)
- func NewProject(ctx *context.Context)
- func NewProjectPost(ctx *context.Context)
- func NewRelease(ctx *context.Context)
- func NewReleasePost(ctx *context.Context)
- func NewWiki(ctx *context.Context)
- func NewWikiPost(ctx *context.Context)
- func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *git.Repository, *git.CompareInfo, string, ...)
- func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
- func PrepareCompareDiff(ctx *context.Context, headUser *models.User, headRepo *models.Repository, ...) bool
- func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo
- func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo
- func Projects(ctx *context.Context)
- func ProtectedBranch(ctx *context.Context)
- func ProtectedBranchPost(ctx *context.Context)
- func RawDiff(ctx *context.Context)
- func RedirectDownload(ctx *context.Context)
- func RefBlame(ctx *context.Context)
- func RefCommits(ctx *context.Context)
- func Releases(ctx *context.Context)
- func RemoveDependency(ctx *context.Context)
- func RemoveUploadFileFromServer(ctx *context.Context)
- func RenderNewCodeCommentForm(ctx *context.Context)
- func RenderUserCards(ctx *context.Context, total int, ...)
- func RestoreBranchPost(ctx *context.Context)
- func RetrieveLabels(ctx *context.Context)
- func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository, isPull bool) []*models.Label
- func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
- func RetrieveRepoReviewers(ctx *context.Context, repo *models.Repository, issue *models.Issue, ...)
- func Search(ctx *context.Context)
- func SearchCommits(ctx *context.Context)
- func ServeBlob(ctx *context.Context, blob *git.Blob) error
- func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error
- func ServeData(ctx *context.Context, name string, size int64, reader io.Reader) error
- func ServiceReceivePack(ctx *context.Context)
- func ServiceUploadPack(ctx *context.Context)
- func SetDefaultProjectBoard(ctx *context.Context)
- func SetDiffViewStyle(ctx *context.Context)
- func SetEditorconfigIfExists(ctx *context.Context)
- func SetWhitespaceBehavior(ctx *context.Context)
- func Settings(ctx *context.Context)
- func SettingsAvatar(ctx *context.Context)
- func SettingsDeleteAvatar(ctx *context.Context)
- func SettingsPost(ctx *context.Context)
- func SettingsProtectedBranch(c *context.Context)
- func SettingsProtectedBranchPost(ctx *context.Context)
- func SingleDownload(ctx *context.Context)
- func SingleDownloadOrLFS(ctx *context.Context)
- func SingleRelease(ctx *context.Context)
- func SlackHooksEditPost(ctx *context.Context)
- func SlackHooksNewPost(ctx *context.Context)
- func Stars(ctx *context.Context)
- func SubmitReview(ctx *context.Context)
- func TagsList(ctx *context.Context)
- func TelegramHooksEditPost(ctx *context.Context)
- func TelegramHooksNewPost(ctx *context.Context)
- func TestWebhook(ctx *context.Context)
- func TopicsPost(ctx *context.Context)
- func TriggerTask(ctx *context.Context)
- func UnlockIssue(ctx *context.Context)
- func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm) error
- func UpdateCommentContent(ctx *context.Context)
- func UpdateIssueAssignee(ctx *context.Context)
- func UpdateIssueContent(ctx *context.Context)
- func UpdateIssueLabel(ctx *context.Context)
- func UpdateIssueMilestone(ctx *context.Context)
- func UpdateIssueProject(ctx *context.Context)
- func UpdateIssueRef(ctx *context.Context)
- func UpdateIssueStatus(ctx *context.Context)
- func UpdateIssueTitle(ctx *context.Context)
- func UpdateLabel(ctx *context.Context)
- func UpdatePullRequest(ctx *context.Context)
- func UpdatePullRequestTarget(ctx *context.Context)
- func UpdatePullReviewRequest(ctx *context.Context)
- func UpdateResolveConversation(ctx *context.Context)
- func UploadFile(ctx *context.Context)
- func UploadFilePost(ctx *context.Context)
- func UploadFileToServer(ctx *context.Context)
- func UploadIssueAttachment(ctx *context.Context)
- func UploadReleaseAttachment(ctx *context.Context)
- func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm, isPull bool) ([]int64, []int64, int64, int64)
- func ViewIssue(ctx *context.Context)
- func ViewProject(ctx *context.Context)
- func ViewPullCommits(ctx *context.Context)
- func ViewPullFiles(ctx *context.Context)
- func Watchers(ctx *context.Context)
- func WebHooksEdit(ctx *context.Context)
- func WebHooksEditPost(ctx *context.Context)
- func Webhooks(ctx *context.Context)
- func WebhooksNew(ctx *context.Context)
- func Wiki(ctx *context.Context)
- func WikiPages(ctx *context.Context)
- func WikiRaw(ctx *context.Context)
- func WikiRevision(ctx *context.Context)
- type Branch
- type PageMeta
- type StopwatchTmplInfo
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTooManyFiles upload too many files ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded") // IssueTemplateCandidates issue templates IssueTemplateCandidates = []string{ "ISSUE_TEMPLATE.md", "issue_template.md", ".gitea/ISSUE_TEMPLATE.md", ".gitea/issue_template.md", ".github/ISSUE_TEMPLATE.md", ".github/issue_template.md", } )
Functions ¶
func ActivityAuthors ¶ added in v1.9.0
ActivityAuthors renders JSON with top commit authors for given time period over all branches
func AddBoardToProjectPost ¶ added in v1.13.0
AddBoardToProjectPost allows a new board to be added to a project.
func AddDependency ¶ added in v1.6.0
AddDependency adds new dependencies
func AddTeamPost ¶ added in v1.10.0
AddTeamPost response for adding a team to a repository
func AddTimeManually ¶ added in v1.3.0
AddTimeManually tracks time manually
func CancelStopwatch ¶ added in v1.3.0
CancelStopwatch cancel the stopwatch
func ChangeCollaborationAccessMode ¶
ChangeCollaborationAccessMode response for changing access of a collaboration
func ChangeCommentReaction ¶ added in v1.4.0
ChangeCommentReaction create a reaction for comment
func ChangeIssueReaction ¶ added in v1.4.0
ChangeIssueReaction create a reaction for issue
func ChangeMilestoneStatus ¶ added in v1.13.0
ChangeMilestoneStatus response for change a milestone's status
func ChangeProjectStatus ¶ added in v1.13.0
ChangeProjectStatus updates the status of a project between "open" and "close"
func CleanUpPullRequest ¶ added in v1.2.0
CleanUpPullRequest responses for delete merged branch when PR has been merged
func Collaboration ¶
Collaboration render a repository's collaboration page
func CollaborationPost ¶
CollaborationPost response for actions for a collaboration of a repository
func CompareAndPullRequestPost ¶
CompareAndPullRequestPost response for creating pull request
func CompareDiff ¶
CompareDiff show different from one commit to another commit
func CreateBranch ¶ added in v1.3.0
CreateBranch creates new branch in repository
func CreateCodeComment ¶ added in v1.6.0
CreateCodeComment will create a code comment including an pending review if required
func CreateProject ¶ added in v1.13.0
CreateProject renders the generic project creation page
func CreateProjectPost ¶ added in v1.13.0
func CreateProjectPost(ctx *context.Context, form auth.UserCreateProjectForm)
CreateProjectPost creates an individual and/or organization project
func DeleteAttachment ¶ added in v1.11.0
DeleteAttachment response for deleting issue's attachment
func DeleteBranchPost ¶ added in v1.1.0
DeleteBranchPost responses for delete merged branch
func DeleteCollaboration ¶
DeleteCollaboration delete a collaboration for a repository
func DeleteDeployKey ¶
DeleteDeployKey response for deleting a deploy key
func DeleteFilePost ¶
DeleteFilePost response for deleting file
func DeleteMilestone ¶
DeleteMilestone delete a milestone
func DeleteProject ¶ added in v1.13.0
DeleteProject delete a project
func DeleteProjectBoard ¶ added in v1.13.0
DeleteProjectBoard allows for the deletion of a project board
func DeleteTeam ¶ added in v1.10.0
DeleteTeam response for deleting a team from a repository
func DeleteTime ¶ added in v1.14.0
DeleteTime deletes tracked time
func DeleteWikiPagePost ¶
DeleteWikiPagePost delete wiki page
func DeployKeys ¶
DeployKeys render the deploy keys list of a repository page
func DeployKeysPost ¶
DeployKeysPost response for adding a deploy key of a repository
func DiffPreviewPost ¶
DiffPreviewPost render preview diff page
func DingtalkHooksEditPost ¶ added in v1.4.0
DingtalkHooksEditPost response for editing discord hook
func DingtalkHooksNewPost ¶ added in v1.4.0
DingtalkHooksNewPost response for creating dingtalk hook
func DiscordHooksEditPost ¶ added in v1.3.0
DiscordHooksEditPost response for editing discord hook
func DiscordHooksNewPost ¶ added in v1.3.0
DiscordHooksNewPost response for creating discord hook
func DismissReview ¶ added in v1.14.0
DismissReview dismissing stale review by repo admin
func DownloadByID ¶ added in v1.7.0
DownloadByID download a file by sha1 ID
func DownloadByIDOrLFS ¶ added in v1.8.0
DownloadByIDOrLFS download a file by sha1 ID taking account of LFS
func DownloadPullDiff ¶ added in v1.4.0
DownloadPullDiff render a pull's raw diff
func DownloadPullDiffOrPatch ¶ added in v1.11.0
DownloadPullDiffOrPatch render a pull's raw diff or patch
func DownloadPullPatch ¶ added in v1.4.0
DownloadPullPatch render a pull's raw patch
func EditMilestone ¶
EditMilestone render edting milestone page
func EditMilestonePost ¶
EditMilestonePost response for edting milestone
func EditProject ¶ added in v1.13.0
EditProject allows a project to be edited
func EditProjectBoard ¶ added in v1.14.0
EditProjectBoard allows a project board's to be updated
func EditProjectPost ¶ added in v1.13.0
EditProjectPost response for editing a project
func EditReleasePost ¶
EditReleasePost response for edit release
func EditWikiPost ¶
EditWikiPost response for wiki modify request
func ExcerptBlob ¶ added in v1.11.0
ExcerptBlob render blob excerpt contents
func FeishuHooksEditPost ¶ added in v1.12.0
FeishuHooksEditPost response for editing feishu hook
func FeishuHooksNewPost ¶ added in v1.12.0
FeishuHooksNewPost response for creating feishu hook
func GetActionIssue ¶ added in v1.3.0
GetActionIssue will return the issue which is used in the context.
func GetActiveStopwatch ¶ added in v1.14.0
GetActiveStopwatch is the middleware that sets .ActiveStopwatch on context
func GetAttachment ¶ added in v1.11.0
GetAttachment serve attachements
func GetClosestParentWithFiles ¶ added in v1.9.0
GetClosestParentWithFiles Recursively gets the path of parent in a tree that has files (used when file in a tree is deleted). Returns "" for the root if no parents other than the root have files. If the given treePath isn't a SubTree or it has no entries, we go up one dir and see if we can return the user to that listing.
func GetCommentAttachments ¶ added in v1.11.0
GetCommentAttachments returns attachments for the comment
func GetEditorConfig ¶ added in v1.12.0
GetEditorConfig returns a editorconfig JSON string for given treePath or "null"
func GetIdxFile ¶ added in v1.14.0
GetIdxFile implements Git dumb HTTP
func GetInfoPacks ¶ added in v1.14.0
GetInfoPacks implements Git dumb HTTP
func GetInfoRefs ¶ added in v1.14.0
GetInfoRefs implements Git dumb HTTP
func GetIssueAttachments ¶ added in v1.11.0
GetIssueAttachments returns attachments for the issue
func GetLooseObject ¶ added in v1.14.0
GetLooseObject implements Git dumb HTTP
func GetPackFile ¶ added in v1.14.0
GetPackFile implements Git dumb HTTP
func GetTextFile ¶ added in v1.14.0
GetTextFile implements Git dumb HTTP
func GetUniquePatchBranchName ¶ added in v1.9.0
GetUniquePatchBranchName Gets a unique branch name for a new patch branch It will be in the form of <username>-patch-<num> where <num> is the first branch of this format that doesn't already exist. If we exceed 1000 tries or an error is thrown, we just return "" so the user has to type in the branch name themselves (will be an empty field)
func GitHooksEdit ¶
GitHooksEdit render for editing a hook of repository page
func GitHooksEditPost ¶
GitHooksEditPost response for editing a git hook of a repository
func GiteaHooksNewPost ¶ added in v1.12.0
GiteaHooksNewPost response for creating Gitea webhook
func GogsHooksEditPost ¶ added in v1.2.0
GogsHooksEditPost response for editing gogs hook
func GogsHooksNewPost ¶ added in v1.2.0
GogsHooksNewPost response for creating webhook
func InitializeLabels ¶
InitializeLabels init labels for a repository
func InitiateDownload ¶ added in v1.14.0
InitiateDownload will enqueue an archival request, as needed. It may submit a request that's already in-progress, but the archiver service will just kind of drop it on the floor if this is the case.
func IssueStopwatch ¶ added in v1.3.0
IssueStopwatch creates or stops a stopwatch for the given issue.
func IssueWatch ¶ added in v1.2.0
IssueWatch sets issue watching
func LFSAutoAssociate ¶ added in v1.11.0
LFSAutoAssociate auto associates accessible lfs files
func LFSDelete ¶ added in v1.11.0
LFSDelete disassociates the provided oid from the repository and if the lfs file is no longer associated with any repositories - deletes it
func LFSFileFind ¶ added in v1.11.0
LFSFileFind guesses a sha for the provided oid (or uses the provided sha) and then finds the commits that contain this sha
func LFSFileGet ¶ added in v1.11.0
LFSFileGet serves a single LFS file
func LFSPointerFiles ¶ added in v1.11.0
LFSPointerFiles will search the repository for pointer files and report which are missing LFS files in the content store
func LatestRelease ¶ added in v1.12.0
LatestRelease redirects to the latest release
func LockIssue ¶ added in v1.8.0
LockIssue locks an issue. This would limit commenting abilities to users with write access to the repo.
func MSTeamsHooksEditPost ¶ added in v1.9.0
MSTeamsHooksEditPost response for editing MS Teams hook
func MSTeamsHooksNewPost ¶ added in v1.9.0
MSTeamsHooksNewPost response for creating MS Teams hook
func MatrixHooksEditPost ¶ added in v1.12.0
MatrixHooksEditPost response for editing a Matrix hook
func MatrixHooksNewPost ¶ added in v1.12.0
MatrixHooksNewPost response for creating a Matrix hook
func MergePullRequest ¶
MergePullRequest response for merging pull request
func MigratePost ¶
MigratePost response for migrating from external git repository
func MilestoneIssuesAndPulls ¶ added in v1.7.0
MilestoneIssuesAndPulls lists all the issues and pull requests of the milestone
func MoveIssueAcrossBoards ¶ added in v1.13.0
MoveIssueAcrossBoards move a card from one board to another in a project
func MustAllowPulls ¶
MustAllowPulls check if repository enable pull requests and user have right to do that
func MustAllowUserComment ¶ added in v1.8.0
MustAllowUserComment checks to make sure if an issue is locked. If locked and user has permissions to write to the repository, then the comment is allowed, else it is blocked
func MustBeAbleToUpload ¶ added in v1.3.0
MustBeAbleToUpload check that repo can be uploaded to
func MustBeEditable ¶ added in v1.3.0
MustBeEditable check that repo can be edited
func MustBeNotEmpty ¶ added in v1.8.0
MustBeNotEmpty render when a repo is a empty git dir
func MustEnableIssues ¶
MustEnableIssues check if repository enable internal issues
func MustEnableProjects ¶ added in v1.13.0
MustEnableProjects check if projects are enabled in settings
func MustEnableWiki ¶
MustEnableWiki check if wiki is enabled, if external then redirect
func NewIssueChooseTemplate ¶ added in v1.13.0
NewIssueChooseTemplate render creating issue from template page
func NewIssuePost ¶
NewIssuePost response for creating new issue
func NewMilestone ¶
NewMilestone render creating milestone page
func NewMilestonePost ¶
NewMilestonePost response for creating milestone
func NewProject ¶ added in v1.13.0
NewProject render creating a project page
func NewProjectPost ¶ added in v1.13.0
NewProjectPost creates a new project
func NewRelease ¶
NewRelease render creating or edit release page
func NewReleasePost ¶
NewReleasePost response for creating a release
func NewWikiPost ¶
NewWikiPost response for wiki create request
func ParseCompareInfo ¶
func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *git.Repository, *git.CompareInfo, string, string)
ParseCompareInfo parse compare info between two commit for preparing comparing references
func ParseHookEvent ¶
func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
ParseHookEvent convert web form content to models.HookEvent
func PrepareCompareDiff ¶
func PrepareCompareDiff( ctx *context.Context, headUser *models.User, headRepo *models.Repository, headGitRepo *git.Repository, compareInfo *git.CompareInfo, baseBranch, headBranch string, whitespaceBehavior string) bool
PrepareCompareDiff renders compare diff page
func PrepareMergedViewPullInfo ¶
PrepareMergedViewPullInfo show meta information for a merged pull request view page
func PrepareViewPullInfo ¶
PrepareViewPullInfo show meta information for a pull request preview page
func ProtectedBranch ¶ added in v1.1.0
ProtectedBranch render the page to protect the repository
func ProtectedBranchPost ¶ added in v1.1.0
ProtectedBranchPost response for protect for a branch of a repository
func RedirectDownload ¶ added in v1.8.0
RedirectDownload return a file based on the following infos:
func RemoveDependency ¶ added in v1.6.0
RemoveDependency removes the dependency
func RemoveUploadFileFromServer ¶
RemoveUploadFileFromServer remove file from server file dir
func RenderNewCodeCommentForm ¶ added in v1.14.0
RenderNewCodeCommentForm will render the form for creating a new review comment
func RenderUserCards ¶
func RenderUserCards(ctx *context.Context, total int, getter func(opts models.ListOptions) ([]*models.User, error), tpl base.TplName)
RenderUserCards render a page show users according the input templaet
func RestoreBranchPost ¶ added in v1.3.0
RestoreBranchPost responses for delete merged branch
func RetrieveLabels ¶
RetrieveLabels find all the labels of a repository and organization
func RetrieveRepoMetas ¶
RetrieveRepoMetas find all the meta information of a repository
func RetrieveRepoMilestonesAndAssignees ¶
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository
func RetrieveRepoReviewers ¶ added in v1.12.0
func RetrieveRepoReviewers(ctx *context.Context, repo *models.Repository, issue *models.Issue, canChooseReviewer bool)
RetrieveRepoReviewers find all reviewers of a repository
func SearchCommits ¶
SearchCommits render commits filtered by keyword
func ServeBlobOrLFS ¶ added in v1.8.0
ServeBlobOrLFS download a git.Blob redirecting to LFS if necessary
func ServiceReceivePack ¶ added in v1.14.0
ServiceReceivePack implements Git Smart HTTP protocol
func ServiceUploadPack ¶ added in v1.14.0
ServiceUploadPack implements Git Smart HTTP protocol
func SetDefaultProjectBoard ¶ added in v1.14.0
SetDefaultProjectBoard set default board for uncategorized issues/pulls
func SetDiffViewStyle ¶ added in v1.0.0
SetDiffViewStyle set diff style as render variable
func SetEditorconfigIfExists ¶ added in v1.0.0
SetEditorconfigIfExists set editor config as render variable
func SetWhitespaceBehavior ¶ added in v1.6.0
SetWhitespaceBehavior set whitespace behavior as render variable
func SettingsAvatar ¶ added in v1.9.0
SettingsAvatar save new POSTed repository avatar
func SettingsDeleteAvatar ¶ added in v1.9.0
SettingsDeleteAvatar delete repository avatar
func SettingsPost ¶
SettingsPost response for changes of a repository
func SettingsProtectedBranch ¶ added in v1.3.0
SettingsProtectedBranch renders the protected branch setting page
func SettingsProtectedBranchPost ¶ added in v1.3.0
SettingsProtectedBranchPost updates the protected branch settings
func SingleDownload ¶
SingleDownload download a file by repos path
func SingleDownloadOrLFS ¶ added in v1.8.0
SingleDownloadOrLFS download a file by repos path redirecting to LFS if necessary
func SingleRelease ¶ added in v1.12.0
SingleRelease renders a single release's page
func SlackHooksEditPost ¶
SlackHooksEditPost response for editing slack hook
func SlackHooksNewPost ¶
SlackHooksNewPost response for creating slack hook
func SubmitReview ¶ added in v1.6.0
SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
func TelegramHooksEditPost ¶ added in v1.9.0
TelegramHooksEditPost response for editing discord hook
func TelegramHooksNewPost ¶ added in v1.9.0
TelegramHooksNewPost response for creating telegram hook
func TopicsPost ¶ added in v1.5.0
TopicsPost response for creating repository
func TriggerTask ¶
TriggerTask response for a trigger task request
func UnlockIssue ¶ added in v1.8.0
UnlockIssue unlocks a previously locked issue.
func UpdateAvatarSetting ¶ added in v1.9.0
func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm) error
UpdateAvatarSetting update repo's avatar
func UpdateCommentContent ¶
UpdateCommentContent change comment of issue's content
func UpdateIssueAssignee ¶
UpdateIssueAssignee change issue's or pull's assignee
func UpdateIssueContent ¶
UpdateIssueContent change issue's content
func UpdateIssueLabel ¶
UpdateIssueLabel change issue's labels
func UpdateIssueMilestone ¶
UpdateIssueMilestone change issue's milestone
func UpdateIssueProject ¶ added in v1.13.0
UpdateIssueProject change an issue's project
func UpdateIssueRef ¶ added in v1.13.0
UpdateIssueRef change issue's ref (branch)
func UpdateIssueStatus ¶ added in v1.2.0
UpdateIssueStatus change issue's status
func UpdateIssueTitle ¶
UpdateIssueTitle change issue's title
func UpdateLabel ¶
UpdateLabel update a label's name and color
func UpdatePullRequest ¶ added in v1.12.0
UpdatePullRequest merge PR's baseBranch into headBranch
func UpdatePullRequestTarget ¶ added in v1.11.0
UpdatePullRequestTarget change pull request's target branch
func UpdatePullReviewRequest ¶ added in v1.12.0
UpdatePullReviewRequest add or remove review request
func UpdateResolveConversation ¶ added in v1.12.0
UpdateResolveConversation add or remove an Conversation resolved mark
func UploadFilePost ¶
UploadFilePost response for uploading file
func UploadFileToServer ¶
UploadFileToServer upload file to server file dir not git
func UploadIssueAttachment ¶
UploadIssueAttachment response for Issue/PR attachments
func UploadReleaseAttachment ¶ added in v1.13.0
UploadReleaseAttachment response for uploading release attachments
func ValidateRepoMetas ¶
func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm, isPull bool) ([]int64, []int64, int64, int64)
ValidateRepoMetas check and returns repository's meta informations
func ViewProject ¶ added in v1.13.0
ViewProject renders the project board for a project
func ViewPullCommits ¶
ViewPullCommits show commits for a pull request
func ViewPullFiles ¶
ViewPullFiles render pull request changed files list page
func WebHooksEdit ¶
WebHooksEdit render editing web hook page
func WebHooksEditPost ¶
WebHooksEditPost response for editing web hook
func WikiRevision ¶ added in v1.10.0
WikiRevision renders file revision list of wiki page
Types ¶
type Branch ¶ added in v1.3.0
type Branch struct { Name string Commit *git.Commit IsProtected bool IsDeleted bool IsIncluded bool DeletedBranch *models.DeletedBranch CommitsAhead int CommitsBehind int LatestPullRequest *models.PullRequest MergeMovedOn bool }
Branch contains the branch information
type StopwatchTmplInfo ¶ added in v1.14.0
StopwatchTmplInfo is a view on a stopwatch specifically for template rendering
Source Files ¶
- activity.go
- attachment.go
- blame.go
- branch.go
- commit.go
- compare.go
- download.go
- editor.go
- http.go
- issue.go
- issue_dependency.go
- issue_label.go
- issue_lock.go
- issue_stopwatch.go
- issue_timetrack.go
- issue_watch.go
- lfs.go
- middlewares.go
- migrate.go
- milestone.go
- projects.go
- pull.go
- pull_review.go
- release.go
- repo.go
- search.go
- setting.go
- setting_protected_branch.go
- topic.go
- view.go
- webhook.go
- wiki.go