aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorChai-Shi <changchaishi@gmail.com>2024-12-31 12:22:09 +0800
committerGitHub <noreply@github.com>2024-12-31 04:22:09 +0000
commit0387195abb82080b4c488966960f25a3e8c6fe66 (patch)
tree794cf1e7705002236a33af563729284b48a303c5 /routers/api/v1
parentc09656e0e0384b15405f909a0e7d7e94a373448e (diff)
downloadgitea-0387195abb82080b4c488966960f25a3e8c6fe66.tar.gz
gitea-0387195abb82080b4c488966960f25a3e8c6fe66.zip
[Feature] Private README.md for organization (#32872)
Implemented #29503 --------- Co-authored-by: Ben Chang <ben_chang@htc.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo/branch.go4
-rw-r--r--routers/api/v1/repo/compare.go2
-rw-r--r--routers/api/v1/repo/download.go2
-rw-r--r--routers/api/v1/repo/file.go2
-rw-r--r--routers/api/v1/repo/repo.go2
5 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go
index 67dfda39a8..2fcdd02058 100644
--- a/routers/api/v1/repo/branch.go
+++ b/routers/api/v1/repo/branch.go
@@ -729,7 +729,7 @@ func CreateBranchProtection(ctx *context.APIContext) {
} else {
if !isPlainRule {
if ctx.Repo.GitRepo == nil {
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, ctx.Repo.Repository)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
return
@@ -1057,7 +1057,7 @@ func EditBranchProtection(ctx *context.APIContext) {
} else {
if !isPlainRule {
if ctx.Repo.GitRepo == nil {
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, ctx.Repo.Repository)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
return
diff --git a/routers/api/v1/repo/compare.go b/routers/api/v1/repo/compare.go
index 87b890cb62..a1813a8a76 100644
--- a/routers/api/v1/repo/compare.go
+++ b/routers/api/v1/repo/compare.go
@@ -45,7 +45,7 @@ func CompareDiff(ctx *context.APIContext) {
if ctx.Repo.GitRepo == nil {
var err error
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, ctx.Repo.Repository)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
return
diff --git a/routers/api/v1/repo/download.go b/routers/api/v1/repo/download.go
index eb967772ed..a8a23c4a8d 100644
--- a/routers/api/v1/repo/download.go
+++ b/routers/api/v1/repo/download.go
@@ -29,7 +29,7 @@ func DownloadArchive(ctx *context.APIContext) {
if ctx.Repo.GitRepo == nil {
var err error
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, ctx.Repo.Repository)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
return
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 8a4f78a3d7..1ad55d225b 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -282,7 +282,7 @@ func GetArchive(ctx *context.APIContext) {
if ctx.Repo.GitRepo == nil {
var err error
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, ctx.Repo.Repository)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
return
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index a192e241b7..ce09e7fc0f 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -726,7 +726,7 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err
if ctx.Repo.GitRepo == nil && !repo.IsEmpty {
var err error
- ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx, repo)
+ ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, repo)
if err != nil {
ctx.Error(http.StatusInternalServerError, "Unable to OpenRepository", err)
return err