mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-21 18:17:45 +02:00
fix compilation errors after rebase
This commit is contained in:
@@ -160,7 +160,7 @@ func migratePushMirrors(x *xorm.Engine) error {
|
|||||||
|
|
||||||
func getRemoteAddress(ownerName, repoName, remoteName string) (string, error) {
|
func getRemoteAddress(ownerName, repoName, remoteName string) (string, error) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
relativePath := repo_model.RelativePath(ownerName, repoName)
|
relativePath := repo_model.RelativePath(ownerName, repoName, 0)
|
||||||
if exist, _ := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(relativePath)); !exist {
|
if exist, _ := gitrepo.IsRepositoryExist(ctx, repo_model.StorageRepo(relativePath)); !exist {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ func FixReleaseSha1OnReleaseTable(ctx context.Context, x *xorm.Engine) error {
|
|||||||
userCache[repo.OwnerID] = user
|
userCache[repo.OwnerID] = user
|
||||||
}
|
}
|
||||||
|
|
||||||
gitRepo, err = gitrepo.OpenRepository(ctx, repo_model.StorageRepo(repo_model.RelativePath(user.Name, repo.Name)))
|
gitRepo, err = gitrepo.OpenRepository(ctx, repo_model.StorageRepo(repo_model.RelativePath(user.Name, repo.Name, 0)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ func GetGroupRepos(ctx *context.APIContext) {
|
|||||||
}
|
}
|
||||||
repos := make([]*api.Repository, len(groupRepos))
|
repos := make([]*api.Repository, len(groupRepos))
|
||||||
for i, repo := range groupRepos {
|
for i, repo := range groupRepos {
|
||||||
permission, err := access_model.GetUserRepoPermission(ctx, repo, ctx.Doer)
|
permission, err := access_model.GetIndividualUserRepoPermission(ctx, repo, ctx.Doer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.APIErrorInternal(err)
|
ctx.APIErrorInternal(err)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ func UpdateGeneralSettings(ctx *context.Context) {
|
|||||||
if ctx.FormBool("cross_repo_add_target") {
|
if ctx.FormBool("cross_repo_add_target") {
|
||||||
targetRepoName := ctx.FormString("cross_repo_add_target_name")
|
targetRepoName := ctx.FormString("cross_repo_add_target_name")
|
||||||
if targetRepoName != "" {
|
if targetRepoName != "" {
|
||||||
targetRepo, err := repo_model.GetRepositoryByName(ctx, rCtx.OwnerID, targetRepoName)
|
targetRepo, err := repo_model.GetRepositoryByName(ctx, rCtx.OwnerID, rCtx.GroupID, targetRepoName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if repo_model.IsErrRepoNotExist(err) {
|
if repo_model.IsErrRepoNotExist(err) {
|
||||||
ctx.JSONError("Repository doesn't exist")
|
ctx.JSONError("Repository doesn't exist")
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const (
|
|||||||
type runnersCtx struct {
|
type runnersCtx struct {
|
||||||
OwnerID int64
|
OwnerID int64
|
||||||
RepoID int64
|
RepoID int64
|
||||||
|
GroupID int64
|
||||||
IsRepo bool
|
IsRepo bool
|
||||||
IsOrg bool
|
IsOrg bool
|
||||||
IsAdmin bool
|
IsAdmin bool
|
||||||
@@ -49,6 +50,7 @@ func getRunnersCtx(ctx *context.Context) (*runnersCtx, error) {
|
|||||||
if ctx.Data["PageIsRepoSettings"] == true {
|
if ctx.Data["PageIsRepoSettings"] == true {
|
||||||
return &runnersCtx{
|
return &runnersCtx{
|
||||||
RepoID: ctx.Repo.Repository.ID,
|
RepoID: ctx.Repo.Repository.ID,
|
||||||
|
GroupID: ctx.Repo.Repository.GroupID,
|
||||||
OwnerID: 0,
|
OwnerID: 0,
|
||||||
IsRepo: true,
|
IsRepo: true,
|
||||||
RunnersTemplate: tplRepoRunners,
|
RunnersTemplate: tplRepoRunners,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error {
|
|||||||
slices.SortStableFunc(repos, func(a, b *repo_model.Repository) int {
|
slices.SortStableFunc(repos, func(a, b *repo_model.Repository) int {
|
||||||
return a.GroupSortOrder - b.GroupSortOrder
|
return a.GroupSortOrder - b.GroupSortOrder
|
||||||
})
|
})
|
||||||
latestCommitStatuses, err := commitstatus_service.FindReposLastestCommitStatuses(opts.Ctx, repos)
|
latestCommitStatuses, err := commitstatus_service.FindReposLatestCommitStatuses(opts.Ctx, repos)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("FindReposLastestCommitStatuses: %v", err)
|
log.Error("FindReposLastestCommitStatuses: %v", err)
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user