mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-03 16:52:10 +02:00
fix compilation errors after rebase
This commit is contained in:
parent
2a56bfbd64
commit
7c18a45f86
@ -160,7 +160,7 @@ func migratePushMirrors(x *xorm.Engine) error {
|
||||
|
||||
func getRemoteAddress(ownerName, repoName, remoteName string) (string, error) {
|
||||
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 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ func FixReleaseSha1OnReleaseTable(ctx context.Context, x *xorm.Engine) error {
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -357,7 +357,7 @@ func GetGroupRepos(ctx *context.APIContext) {
|
||||
}
|
||||
repos := make([]*api.Repository, len(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 {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
|
||||
@ -118,7 +118,7 @@ func UpdateGeneralSettings(ctx *context.Context) {
|
||||
if ctx.FormBool("cross_repo_add_target") {
|
||||
targetRepoName := ctx.FormString("cross_repo_add_target_name")
|
||||
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 repo_model.IsErrRepoNotExist(err) {
|
||||
ctx.JSONError("Repository doesn't exist")
|
||||
|
||||
@ -36,6 +36,7 @@ const (
|
||||
type runnersCtx struct {
|
||||
OwnerID int64
|
||||
RepoID int64
|
||||
GroupID int64
|
||||
IsRepo bool
|
||||
IsOrg bool
|
||||
IsAdmin bool
|
||||
@ -49,6 +50,7 @@ func getRunnersCtx(ctx *context.Context) (*runnersCtx, error) {
|
||||
if ctx.Data["PageIsRepoSettings"] == true {
|
||||
return &runnersCtx{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
GroupID: ctx.Repo.Repository.GroupID,
|
||||
OwnerID: 0,
|
||||
IsRepo: true,
|
||||
RunnersTemplate: tplRepoRunners,
|
||||
|
||||
@ -94,7 +94,7 @@ func (w *WebSearchGroup) doLoadChildren(opts *WebSearchOptions) error {
|
||||
slices.SortStableFunc(repos, func(a, b *repo_model.Repository) int {
|
||||
return a.GroupSortOrder - b.GroupSortOrder
|
||||
})
|
||||
latestCommitStatuses, err := commitstatus_service.FindReposLastestCommitStatuses(opts.Ctx, repos)
|
||||
latestCommitStatuses, err := commitstatus_service.FindReposLatestCommitStatuses(opts.Ctx, repos)
|
||||
if err != nil {
|
||||
log.Error("FindReposLastestCommitStatuses: %v", err)
|
||||
return err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user