repo

package
v1.14.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 74 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 Action

func Action(ctx *context.Context)

Action response for actions to a repository

func Activity added in v1.3.0

func Activity(ctx *context.Context)

Activity render the page to show repository latest changes

func ActivityAuthors added in v1.9.0

func ActivityAuthors(ctx *context.Context)

ActivityAuthors renders JSON with top commit authors for given time period over all branches

func AddBoardToProjectPost added in v1.13.0

func AddBoardToProjectPost(ctx *context.Context)

AddBoardToProjectPost allows a new board to be added to a project.

func AddDependency added in v1.6.0

func AddDependency(ctx *context.Context)

AddDependency adds new dependencies

func AddTeamPost added in v1.10.0

func AddTeamPost(ctx *context.Context)

AddTeamPost response for adding a team to a repository

func AddTimeManually added in v1.3.0

func AddTimeManually(c *context.Context)

AddTimeManually tracks time manually

func Branches

func Branches(ctx *context.Context)

Branches render repository branch page

func CancelStopwatch added in v1.3.0

func CancelStopwatch(c *context.Context)

CancelStopwatch cancel the stopwatch

func ChangeCollaborationAccessMode

func ChangeCollaborationAccessMode(ctx *context.Context)

ChangeCollaborationAccessMode response for changing access of a collaboration

func ChangeCommentReaction added in v1.4.0

func ChangeCommentReaction(ctx *context.Context)

ChangeCommentReaction create a reaction for comment

func ChangeIssueReaction added in v1.4.0

func ChangeIssueReaction(ctx *context.Context)

ChangeIssueReaction create a reaction for issue

func ChangeMilestoneStatus added in v1.13.0

func ChangeMilestoneStatus(ctx *context.Context)

ChangeMilestoneStatus response for change a milestone's status

func ChangeProjectStatus added in v1.13.0

func ChangeProjectStatus(ctx *context.Context)

ChangeProjectStatus updates the status of a project between "open" and "close"

func CleanUpPullRequest added in v1.2.0

func CleanUpPullRequest(ctx *context.Context)

CleanUpPullRequest responses for delete merged branch when PR has been merged

func Collaboration

func Collaboration(ctx *context.Context)

Collaboration render a repository's collaboration page

func CollaborationPost

func CollaborationPost(ctx *context.Context)

CollaborationPost response for actions for a collaboration of a repository

func Commits

func Commits(ctx *context.Context)

Commits render branch's commits

func CompareAndPullRequestPost

func CompareAndPullRequestPost(ctx *context.Context)

CompareAndPullRequestPost response for creating pull request

func CompareDiff

func CompareDiff(ctx *context.Context)

CompareDiff show different from one commit to another commit

func Create

func Create(ctx *context.Context)

Create render creating repository page

func CreateBranch added in v1.3.0

func CreateBranch(ctx *context.Context)

CreateBranch creates new branch in repository

func CreateCodeComment added in v1.6.0

func CreateCodeComment(ctx *context.Context)

CreateCodeComment will create a code comment including an pending review if required

func CreatePost

func CreatePost(ctx *context.Context)

CreatePost response for creating repository

func CreateProject added in v1.13.0

func CreateProject(ctx *context.Context)

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

func DeleteAttachment(ctx *context.Context)

DeleteAttachment response for deleting issue's attachment

func DeleteBranchPost added in v1.1.0

func DeleteBranchPost(ctx *context.Context)

DeleteBranchPost responses for delete merged branch

func DeleteCollaboration

func DeleteCollaboration(ctx *context.Context)

DeleteCollaboration delete a collaboration for a repository

func DeleteComment

func DeleteComment(ctx *context.Context)

DeleteComment delete comment of issue

func DeleteDeployKey

func DeleteDeployKey(ctx *context.Context)

DeleteDeployKey response for deleting a deploy key

func DeleteFile

func DeleteFile(ctx *context.Context)

DeleteFile render delete file page

func DeleteFilePost

func DeleteFilePost(ctx *context.Context)

DeleteFilePost response for deleting file

func DeleteLabel

func DeleteLabel(ctx *context.Context)

DeleteLabel delete a label

func DeleteMilestone

func DeleteMilestone(ctx *context.Context)

DeleteMilestone delete a milestone

func DeleteProject added in v1.13.0

func DeleteProject(ctx *context.Context)

DeleteProject delete a project

func DeleteProjectBoard added in v1.13.0

func DeleteProjectBoard(ctx *context.Context)

DeleteProjectBoard allows for the deletion of a project board

func DeleteRelease

func DeleteRelease(ctx *context.Context)

DeleteRelease delete a release

func DeleteTag added in v1.14.0

func DeleteTag(ctx *context.Context)

DeleteTag delete a tag

func DeleteTeam added in v1.10.0

func DeleteTeam(ctx *context.Context)

DeleteTeam response for deleting a team from a repository

func DeleteTime added in v1.14.0

func DeleteTime(c *context.Context)

DeleteTime deletes tracked time

func DeleteWebhook

func DeleteWebhook(ctx *context.Context)

DeleteWebhook delete a webhook

func DeleteWikiPagePost

func DeleteWikiPagePost(ctx *context.Context)

DeleteWikiPagePost delete wiki page

func DeployKeys

func DeployKeys(ctx *context.Context)

DeployKeys render the deploy keys list of a repository page

func DeployKeysPost

func DeployKeysPost(ctx *context.Context)

DeployKeysPost response for adding a deploy key of a repository

func Diff

func Diff(ctx *context.Context)

Diff show different from current commit to previous commit

func DiffPreviewPost

func DiffPreviewPost(ctx *context.Context)

DiffPreviewPost render preview diff page

func DingtalkHooksEditPost added in v1.4.0

func DingtalkHooksEditPost(ctx *context.Context)

DingtalkHooksEditPost response for editing discord hook

func DingtalkHooksNewPost added in v1.4.0

func DingtalkHooksNewPost(ctx *context.Context)

DingtalkHooksNewPost response for creating dingtalk hook

func DiscordHooksEditPost added in v1.3.0

func DiscordHooksEditPost(ctx *context.Context)

DiscordHooksEditPost response for editing discord hook

func DiscordHooksNewPost added in v1.3.0

func DiscordHooksNewPost(ctx *context.Context)

DiscordHooksNewPost response for creating discord hook

func DismissReview added in v1.14.0

func DismissReview(ctx *context.Context)

DismissReview dismissing stale review by repo admin

func Download

func Download(ctx *context.Context)

Download an archive of a repository

func DownloadByID added in v1.7.0

func DownloadByID(ctx *context.Context)

DownloadByID download a file by sha1 ID

func DownloadByIDOrLFS added in v1.8.0

func DownloadByIDOrLFS(ctx *context.Context)

DownloadByIDOrLFS download a file by sha1 ID taking account of LFS

func DownloadPullDiff added in v1.4.0

func DownloadPullDiff(ctx *context.Context)

DownloadPullDiff render a pull's raw diff

func DownloadPullDiffOrPatch added in v1.11.0

func DownloadPullDiffOrPatch(ctx *context.Context, patch bool)

DownloadPullDiffOrPatch render a pull's raw diff or patch

func DownloadPullPatch added in v1.4.0

func DownloadPullPatch(ctx *context.Context)

DownloadPullPatch render a pull's raw patch

func EditFile

func EditFile(ctx *context.Context)

EditFile render edit file page

func EditFilePost

func EditFilePost(ctx *context.Context)

EditFilePost response for editing file

func EditMilestone

func EditMilestone(ctx *context.Context)

EditMilestone render edting milestone page

func EditMilestonePost

func EditMilestonePost(ctx *context.Context)

EditMilestonePost response for edting milestone

func EditProject added in v1.13.0

func EditProject(ctx *context.Context)

EditProject allows a project to be edited

func EditProjectBoard added in v1.14.0

func EditProjectBoard(ctx *context.Context)

EditProjectBoard allows a project board's to be updated

func EditProjectPost added in v1.13.0

func EditProjectPost(ctx *context.Context)

EditProjectPost response for editing a project

func EditRelease

func EditRelease(ctx *context.Context)

EditRelease render release edit page

func EditReleasePost

func EditReleasePost(ctx *context.Context)

EditReleasePost response for edit release

func EditWiki

func EditWiki(ctx *context.Context)

EditWiki render wiki modify page

func EditWikiPost

func EditWikiPost(ctx *context.Context)

EditWikiPost response for wiki modify request

func ExcerptBlob added in v1.11.0

func ExcerptBlob(ctx *context.Context)

ExcerptBlob render blob excerpt contents

func FeishuHooksEditPost added in v1.12.0

func FeishuHooksEditPost(ctx *context.Context)

FeishuHooksEditPost response for editing feishu hook

func FeishuHooksNewPost added in v1.12.0

func FeishuHooksNewPost(ctx *context.Context)

FeishuHooksNewPost response for creating feishu hook

func FileHistory

func FileHistory(ctx *context.Context)

FileHistory show a file's reversions

func Fork

func Fork(ctx *context.Context)

Fork render repository fork page

func ForkPost

func ForkPost(ctx *context.Context)

ForkPost response for forking a repository

func Forks

func Forks(ctx *context.Context)

Forks render repository's forked users

func GetActionIssue added in v1.3.0

func GetActionIssue(ctx *context.Context) *models.Issue

GetActionIssue will return the issue which is used in the context.

func GetActiveStopwatch added in v1.14.0

func GetActiveStopwatch(c *context.Context)

GetActiveStopwatch is the middleware that sets .ActiveStopwatch on context

func GetAttachment added in v1.11.0

func GetAttachment(ctx *context.Context)

GetAttachment serve attachements

func GetClosestParentWithFiles added in v1.9.0

func GetClosestParentWithFiles(treePath string, commit *git.Commit) string

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

func GetCommentAttachments(ctx *context.Context)

GetCommentAttachments returns attachments for the comment

func GetEditorConfig added in v1.12.0

func GetEditorConfig(ctx *context.Context, treePath string) string

GetEditorConfig returns a editorconfig JSON string for given treePath or "null"

func GetIdxFile added in v1.14.0

func GetIdxFile(ctx *context.Context)

GetIdxFile implements Git dumb HTTP

func GetInfoPacks added in v1.14.0

func GetInfoPacks(ctx *context.Context)

GetInfoPacks implements Git dumb HTTP

func GetInfoRefs added in v1.14.0

func GetInfoRefs(ctx *context.Context)

GetInfoRefs implements Git dumb HTTP

func GetIssueAttachments added in v1.11.0

func GetIssueAttachments(ctx *context.Context)

GetIssueAttachments returns attachments for the issue

func GetLooseObject added in v1.14.0

func GetLooseObject(ctx *context.Context)

GetLooseObject implements Git dumb HTTP

func GetPackFile added in v1.14.0

func GetPackFile(ctx *context.Context)

GetPackFile implements Git dumb HTTP

func GetTextFile added in v1.14.0

func GetTextFile(p string) func(*context.Context)

GetTextFile implements Git dumb HTTP

func GetUniquePatchBranchName added in v1.9.0

func GetUniquePatchBranchName(ctx *context.Context) string

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 GitHooks

func GitHooks(ctx *context.Context)

GitHooks hooks of a repository

func GitHooksEdit

func GitHooksEdit(ctx *context.Context)

GitHooksEdit render for editing a hook of repository page

func GitHooksEditPost

func GitHooksEditPost(ctx *context.Context)

GitHooksEditPost response for editing a git hook of a repository

func GiteaHooksNewPost added in v1.12.0

func GiteaHooksNewPost(ctx *context.Context)

GiteaHooksNewPost response for creating Gitea webhook

func GogsHooksEditPost added in v1.2.0

func GogsHooksEditPost(ctx *context.Context)

GogsHooksEditPost response for editing gogs hook

func GogsHooksNewPost added in v1.2.0

func GogsHooksNewPost(ctx *context.Context)

GogsHooksNewPost response for creating webhook

func Graph added in v1.1.0

func Graph(ctx *context.Context)

Graph render commit graph - show commits from all branches.

func Home

func Home(ctx *context.Context)

Home render repository home page

func InitializeLabels

func InitializeLabels(ctx *context.Context)

InitializeLabels init labels for a repository

func InitiateDownload added in v1.14.0

func InitiateDownload(ctx *context.Context)

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

func IssueStopwatch(c *context.Context)

IssueStopwatch creates or stops a stopwatch for the given issue.

func IssueWatch added in v1.2.0

func IssueWatch(ctx *context.Context)

IssueWatch sets issue watching

func Issues

func Issues(ctx *context.Context)

Issues render issues page

func LFSAutoAssociate added in v1.11.0

func LFSAutoAssociate(ctx *context.Context)

LFSAutoAssociate auto associates accessible lfs files

func LFSDelete added in v1.11.0

func LFSDelete(ctx *context.Context)

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

func LFSFileFind(ctx *context.Context)

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

func LFSFileGet(ctx *context.Context)

LFSFileGet serves a single LFS file

func LFSFiles added in v1.11.0

func LFSFiles(ctx *context.Context)

LFSFiles shows a repository's LFS files

func LFSLockFile added in v1.11.0

func LFSLockFile(ctx *context.Context)

LFSLockFile locks a file

func LFSLocks added in v1.11.0

func LFSLocks(ctx *context.Context)

LFSLocks shows a repository's LFS locks

func LFSPointerFiles added in v1.11.0

func LFSPointerFiles(ctx *context.Context)

LFSPointerFiles will search the repository for pointer files and report which are missing LFS files in the content store

func LFSUnlock added in v1.11.0

func LFSUnlock(ctx *context.Context)

LFSUnlock forcibly unlocks an LFS lock

func Labels

func Labels(ctx *context.Context)

Labels render issue's labels page

func LatestRelease added in v1.12.0

func LatestRelease(ctx *context.Context)

LatestRelease redirects to the latest release

func LockIssue added in v1.8.0

func LockIssue(ctx *context.Context)

LockIssue locks an issue. This would limit commenting abilities to users with write access to the repo.

func MSTeamsHooksEditPost added in v1.9.0

func MSTeamsHooksEditPost(ctx *context.Context)

MSTeamsHooksEditPost response for editing MS Teams hook

func MSTeamsHooksNewPost added in v1.9.0

func MSTeamsHooksNewPost(ctx *context.Context)

MSTeamsHooksNewPost response for creating MS Teams hook

func MatrixHooksEditPost added in v1.12.0

func MatrixHooksEditPost(ctx *context.Context)

MatrixHooksEditPost response for editing a Matrix hook

func MatrixHooksNewPost added in v1.12.0

func MatrixHooksNewPost(ctx *context.Context)

MatrixHooksNewPost response for creating a Matrix hook

func MergePullRequest

func MergePullRequest(ctx *context.Context)

MergePullRequest response for merging pull request

func Migrate

func Migrate(ctx *context.Context)

Migrate render migration of repository page

func MigratePost

func MigratePost(ctx *context.Context)

MigratePost response for migrating from external git repository

func MilestoneIssuesAndPulls added in v1.7.0

func MilestoneIssuesAndPulls(ctx *context.Context)

MilestoneIssuesAndPulls lists all the issues and pull requests of the milestone

func Milestones

func Milestones(ctx *context.Context)

Milestones render milestones page

func MoveIssueAcrossBoards added in v1.13.0

func MoveIssueAcrossBoards(ctx *context.Context)

MoveIssueAcrossBoards move a card from one board to another in a project

func MustAllowPulls

func MustAllowPulls(ctx *context.Context)

MustAllowPulls check if repository enable pull requests and user have right to do that

func MustAllowUserComment added in v1.8.0

func MustAllowUserComment(ctx *context.Context)

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

func MustBeAbleToUpload(ctx *context.Context)

MustBeAbleToUpload check that repo can be uploaded to

func MustBeEditable added in v1.3.0

func MustBeEditable(ctx *context.Context)

MustBeEditable check that repo can be edited

func MustBeNotEmpty added in v1.8.0

func MustBeNotEmpty(ctx *context.Context)

MustBeNotEmpty render when a repo is a empty git dir

func MustEnableIssues

func MustEnableIssues(ctx *context.Context)

MustEnableIssues check if repository enable internal issues

func MustEnableProjects added in v1.13.0

func MustEnableProjects(ctx *context.Context)

MustEnableProjects check if projects are enabled in settings

func MustEnableWiki

func MustEnableWiki(ctx *context.Context)

MustEnableWiki check if wiki is enabled, if external then redirect

func NewComment

func NewComment(ctx *context.Context)

NewComment create a comment for issue

func NewFile

func NewFile(ctx *context.Context)

NewFile render create file page

func NewFilePost

func NewFilePost(ctx *context.Context)

NewFilePost response for creating file

func NewIssue

func NewIssue(ctx *context.Context)

NewIssue render creating issue page

func NewIssueChooseTemplate added in v1.13.0

func NewIssueChooseTemplate(ctx *context.Context)

NewIssueChooseTemplate render creating issue from template page

func NewIssuePost

func NewIssuePost(ctx *context.Context)

NewIssuePost response for creating new issue

func NewLabel

func NewLabel(ctx *context.Context)

NewLabel create new label for repository

func NewMilestone

func NewMilestone(ctx *context.Context)

NewMilestone render creating milestone page

func NewMilestonePost

func NewMilestonePost(ctx *context.Context)

NewMilestonePost response for creating milestone

func NewProject added in v1.13.0

func NewProject(ctx *context.Context)

NewProject render creating a project page

func NewProjectPost added in v1.13.0

func NewProjectPost(ctx *context.Context)

NewProjectPost creates a new project

func NewRelease

func NewRelease(ctx *context.Context)

NewRelease render creating or edit release page

func NewReleasePost

func NewReleasePost(ctx *context.Context)

NewReleasePost response for creating a release

func NewWiki

func NewWiki(ctx *context.Context)

NewWiki render wiki create page

func NewWikiPost

func NewWikiPost(ctx *context.Context)

NewWikiPost response for wiki create request

func ParseCompareInfo

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

func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo

PrepareMergedViewPullInfo show meta information for a merged pull request view page

func PrepareViewPullInfo

func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo

PrepareViewPullInfo show meta information for a pull request preview page

func Projects added in v1.13.0

func Projects(ctx *context.Context)

Projects renders the home page of projects

func ProtectedBranch added in v1.1.0

func ProtectedBranch(ctx *context.Context)

ProtectedBranch render the page to protect the repository

func ProtectedBranchPost added in v1.1.0

func ProtectedBranchPost(ctx *context.Context)

ProtectedBranchPost response for protect for a branch of a repository

func RawDiff

func RawDiff(ctx *context.Context)

RawDiff dumps diff results of repository in given commit ID to io.Writer

func RedirectDownload added in v1.8.0

func RedirectDownload(ctx *context.Context)

RedirectDownload return a file based on the following infos:

func RefBlame added in v1.9.0

func RefBlame(ctx *context.Context)

RefBlame render blame page

func RefCommits

func RefCommits(ctx *context.Context)

RefCommits render commits page

func Releases

func Releases(ctx *context.Context)

Releases render releases list page

func RemoveDependency added in v1.6.0

func RemoveDependency(ctx *context.Context)

RemoveDependency removes the dependency

func RemoveUploadFileFromServer

func RemoveUploadFileFromServer(ctx *context.Context)

RemoveUploadFileFromServer remove file from server file dir

func RenderNewCodeCommentForm added in v1.14.0

func RenderNewCodeCommentForm(ctx *context.Context)

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

func RestoreBranchPost(ctx *context.Context)

RestoreBranchPost responses for delete merged branch

func RetrieveLabels

func RetrieveLabels(ctx *context.Context)

RetrieveLabels find all the labels of a repository and organization

func RetrieveRepoMetas

func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository, isPull bool) []*models.Label

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 Search(ctx *context.Context)

Search render repository search page

func SearchCommits

func SearchCommits(ctx *context.Context)

SearchCommits render commits filtered by keyword

func ServeBlob

func ServeBlob(ctx *context.Context, blob *git.Blob) error

ServeBlob download a git.Blob

func ServeBlobOrLFS added in v1.8.0

func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error

ServeBlobOrLFS download a git.Blob redirecting to LFS if necessary

func ServeData

func ServeData(ctx *context.Context, name string, size int64, reader io.Reader) error

ServeData download file from io.Reader

func ServiceReceivePack added in v1.14.0

func ServiceReceivePack(ctx *context.Context)

ServiceReceivePack implements Git Smart HTTP protocol

func ServiceUploadPack added in v1.14.0

func ServiceUploadPack(ctx *context.Context)

ServiceUploadPack implements Git Smart HTTP protocol

func SetDefaultProjectBoard added in v1.14.0

func SetDefaultProjectBoard(ctx *context.Context)

SetDefaultProjectBoard set default board for uncategorized issues/pulls

func SetDiffViewStyle added in v1.0.0

func SetDiffViewStyle(ctx *context.Context)

SetDiffViewStyle set diff style as render variable

func SetEditorconfigIfExists added in v1.0.0

func SetEditorconfigIfExists(ctx *context.Context)

SetEditorconfigIfExists set editor config as render variable

func SetWhitespaceBehavior added in v1.6.0

func SetWhitespaceBehavior(ctx *context.Context)

SetWhitespaceBehavior set whitespace behavior as render variable

func Settings

func Settings(ctx *context.Context)

Settings show a repository's settings page

func SettingsAvatar added in v1.9.0

func SettingsAvatar(ctx *context.Context)

SettingsAvatar save new POSTed repository avatar

func SettingsDeleteAvatar added in v1.9.0

func SettingsDeleteAvatar(ctx *context.Context)

SettingsDeleteAvatar delete repository avatar

func SettingsPost

func SettingsPost(ctx *context.Context)

SettingsPost response for changes of a repository

func SettingsProtectedBranch added in v1.3.0

func SettingsProtectedBranch(c *context.Context)

SettingsProtectedBranch renders the protected branch setting page

func SettingsProtectedBranchPost added in v1.3.0

func SettingsProtectedBranchPost(ctx *context.Context)

SettingsProtectedBranchPost updates the protected branch settings

func SingleDownload

func SingleDownload(ctx *context.Context)

SingleDownload download a file by repos path

func SingleDownloadOrLFS added in v1.8.0

func SingleDownloadOrLFS(ctx *context.Context)

SingleDownloadOrLFS download a file by repos path redirecting to LFS if necessary

func SingleRelease added in v1.12.0

func SingleRelease(ctx *context.Context)

SingleRelease renders a single release's page

func SlackHooksEditPost

func SlackHooksEditPost(ctx *context.Context)

SlackHooksEditPost response for editing slack hook

func SlackHooksNewPost

func SlackHooksNewPost(ctx *context.Context)

SlackHooksNewPost response for creating slack hook

func Stars

func Stars(ctx *context.Context)

Stars render repository's starred users

func SubmitReview added in v1.6.0

func SubmitReview(ctx *context.Context)

SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist

func TagsList added in v1.14.0

func TagsList(ctx *context.Context)

TagsList render tags list page

func TelegramHooksEditPost added in v1.9.0

func TelegramHooksEditPost(ctx *context.Context)

TelegramHooksEditPost response for editing discord hook

func TelegramHooksNewPost added in v1.9.0

func TelegramHooksNewPost(ctx *context.Context)

TelegramHooksNewPost response for creating telegram hook

func TestWebhook

func TestWebhook(ctx *context.Context)

TestWebhook test if web hook is work fine

func TopicsPost added in v1.5.0

func TopicsPost(ctx *context.Context)

TopicsPost response for creating repository

func TriggerTask

func TriggerTask(ctx *context.Context)

TriggerTask response for a trigger task request

func UnlockIssue added in v1.8.0

func UnlockIssue(ctx *context.Context)

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

func UpdateCommentContent(ctx *context.Context)

UpdateCommentContent change comment of issue's content

func UpdateIssueAssignee

func UpdateIssueAssignee(ctx *context.Context)

UpdateIssueAssignee change issue's or pull's assignee

func UpdateIssueContent

func UpdateIssueContent(ctx *context.Context)

UpdateIssueContent change issue's content

func UpdateIssueLabel

func UpdateIssueLabel(ctx *context.Context)

UpdateIssueLabel change issue's labels

func UpdateIssueMilestone

func UpdateIssueMilestone(ctx *context.Context)

UpdateIssueMilestone change issue's milestone

func UpdateIssueProject added in v1.13.0

func UpdateIssueProject(ctx *context.Context)

UpdateIssueProject change an issue's project

func UpdateIssueRef added in v1.13.0

func UpdateIssueRef(ctx *context.Context)

UpdateIssueRef change issue's ref (branch)

func UpdateIssueStatus added in v1.2.0

func UpdateIssueStatus(ctx *context.Context)

UpdateIssueStatus change issue's status

func UpdateIssueTitle

func UpdateIssueTitle(ctx *context.Context)

UpdateIssueTitle change issue's title

func UpdateLabel

func UpdateLabel(ctx *context.Context)

UpdateLabel update a label's name and color

func UpdatePullRequest added in v1.12.0

func UpdatePullRequest(ctx *context.Context)

UpdatePullRequest merge PR's baseBranch into headBranch

func UpdatePullRequestTarget added in v1.11.0

func UpdatePullRequestTarget(ctx *context.Context)

UpdatePullRequestTarget change pull request's target branch

func UpdatePullReviewRequest added in v1.12.0

func UpdatePullReviewRequest(ctx *context.Context)

UpdatePullReviewRequest add or remove review request

func UpdateResolveConversation added in v1.12.0

func UpdateResolveConversation(ctx *context.Context)

UpdateResolveConversation add or remove an Conversation resolved mark

func UploadFile

func UploadFile(ctx *context.Context)

UploadFile render upload file page

func UploadFilePost

func UploadFilePost(ctx *context.Context)

UploadFilePost response for uploading file

func UploadFileToServer

func UploadFileToServer(ctx *context.Context)

UploadFileToServer upload file to server file dir not git

func UploadIssueAttachment

func UploadIssueAttachment(ctx *context.Context)

UploadIssueAttachment response for Issue/PR attachments

func UploadReleaseAttachment added in v1.13.0

func UploadReleaseAttachment(ctx *context.Context)

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 ViewIssue

func ViewIssue(ctx *context.Context)

ViewIssue render issue view page

func ViewProject added in v1.13.0

func ViewProject(ctx *context.Context)

ViewProject renders the project board for a project

func ViewPullCommits

func ViewPullCommits(ctx *context.Context)

ViewPullCommits show commits for a pull request

func ViewPullFiles

func ViewPullFiles(ctx *context.Context)

ViewPullFiles render pull request changed files list page

func Watchers

func Watchers(ctx *context.Context)

Watchers render repository's watch users

func WebHooksEdit

func WebHooksEdit(ctx *context.Context)

WebHooksEdit render editing web hook page

func WebHooksEditPost

func WebHooksEditPost(ctx *context.Context)

WebHooksEditPost response for editing web hook

func Webhooks

func Webhooks(ctx *context.Context)

Webhooks render web hooks list page

func WebhooksNew

func WebhooksNew(ctx *context.Context)

WebhooksNew render creating webhook page

func Wiki

func Wiki(ctx *context.Context)

Wiki renders single wiki page

func WikiPages

func WikiPages(ctx *context.Context)

WikiPages render wiki pages list page

func WikiRaw added in v1.1.0

func WikiRaw(ctx *context.Context)

WikiRaw outputs raw blob requested by user (image for example)

func WikiRevision added in v1.10.0

func WikiRevision(ctx *context.Context)

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 PageMeta

type PageMeta struct {
	Name        string
	SubURL      string
	UpdatedUnix timeutil.TimeStamp
}

PageMeta wiki page meta information

type StopwatchTmplInfo added in v1.14.0

type StopwatchTmplInfo struct {
	RepoSlug   string
	IssueIndex int64
	Seconds    int64
}

StopwatchTmplInfo is a view on a stopwatch specifically for template rendering

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL