aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/http.go2
-rw-r--r--routers/repo/webhook.go4
-rw-r--r--routers/repo/wiki.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 91438812a6..2f0a707f7c 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -208,7 +208,7 @@ func HTTP(ctx *context.Context) {
RepoUserName: username,
RepoName: reponame,
}); err == nil {
- go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refFullName, git.BRANCH_PREFIX), true)
+ go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refFullName, git.BranchPrefix), true)
}
}
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index c3150a02f6..754cf169b8 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -361,7 +361,7 @@ func TestWebhook(ctx *context.Context) {
if commit == nil {
ghost := models.NewGhostUser()
commit = &git.Commit{
- ID: git.MustIDFromString(git.EMPTY_SHA),
+ ID: git.MustIDFromString(git.EmptySHA),
Author: ghost.NewGitSig(),
Committer: ghost.NewGitSig(),
CommitMessage: "This is a fake commit",
@@ -370,7 +370,7 @@ func TestWebhook(ctx *context.Context) {
apiUser := ctx.User.APIFormat()
p := &api.PushPayload{
- Ref: git.BRANCH_PREFIX + ctx.Repo.Repository.DefaultBranch,
+ Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch,
Before: commit.ID.String(),
After: commit.ID.String(),
Commits: []*api.PayloadCommit{
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index ebef4bbbcb..759b1b305e 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -66,7 +66,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, str
}
pages := make([]PageMeta, 0, len(entries))
for i := range entries {
- if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") {
+ if entries[i].Type == git.ObjectBlob && strings.HasSuffix(entries[i].Name(), ".md") {
name := strings.TrimSuffix(entries[i].Name(), ".md")
pages = append(pages, PageMeta{
Name: name,
@@ -171,7 +171,7 @@ func WikiPages(ctx *context.Context) {
}
pages := make([]PageMeta, 0, len(entries))
for i := range entries {
- if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") {
+ if entries[i].Type == git.ObjectBlob && strings.HasSuffix(entries[i].Name(), ".md") {
c, err := wikiRepo.GetCommitByPath(entries[i].Name())
if err != nil {
ctx.Handle(500, "GetCommit", err)