diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index bcbd21884616c..d1be7071d4667 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -177,3 +177,15 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 - run: make lint-actions + + test-dev-check: + if: needs.files-changed.outputs.backend == 'true' + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "~1.21" + check-latest: true + - run: make test-dev-ci-check diff --git a/.gitignore b/.gitignore index 53365ed0b4e8e..a2688a3fe3f06 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,5 @@ prime/ # Manpage /man + +/tests/dev diff --git a/Makefile b/Makefile index fd852cbaf934e..5ccc08b82a15e 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ TEST_MSSQL_HOST ?= mssql:1433 TEST_MSSQL_DBNAME ?= gitea TEST_MSSQL_USERNAME ?= sa TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1 +TEST_DEV_ADDR ?= localhost .PHONY: all all: build @@ -518,6 +519,20 @@ generate-ini-sqlite: -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ tests/sqlite.ini.tmpl > tests/sqlite.ini +generate-ini-dev: + sed -e 's|{{GITEA_ROOT}}|${CURDIR}|g' -e 's|{{GITEA_DEV_ADDR}}|${TEST_DEV_ADDR}|g' tests/dev.ini.tmpl > tests/dev.ini + +.PHONY: test-dev +test-dev: generate-ini-dev + GITEA_ROOT="$(CURDIR)" $(GO) run -tags 'sqlite sqlite_unlock_notify' contrib/dev/dev.go + +.PHONY: test-dev-ci +test-dev-ci: generate-ini-dev + GITEA_ROOT="$(CURDIR)" $(GO) run -tags 'sqlite sqlite_unlock_notify' contrib/dev/dev.go web --ci + +.PHONY: test-dev-ci-check +test-dev-ci-check: test-dev-ci test-check + .PHONY: test-sqlite test-sqlite: integrations.sqlite.test generate-ini-sqlite GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test diff --git a/contrib/dev/dev.go b/contrib/dev/dev.go new file mode 100644 index 0000000000000..eade33c39bda8 --- /dev/null +++ b/contrib/dev/dev.go @@ -0,0 +1,418 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package main + +import ( + "context" + "io/fs" + "net/http" + "os" + "path" + "path/filepath" + "strings" + "time" + + "code.gitea.io/gitea/cmd" + "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/routers" + "code.gitea.io/gitea/routers/common" + repo_service "code.gitea.io/gitea/services/repository" + + _ "code.gitea.io/gitea/models" + + "github.com/urfave/cli/v2" + "gopkg.in/yaml.v3" +) + +// To start a gitea develop server with the test data, and auto update test data when the service stop. +// GITEA_ROOT=`pwd` go run -tags 'sqlite sqlite_unlock_notify' contrib/dev/dev.go + +func main() { + app := cmd.NewMainApp("dev", "") + for _, command := range app.Commands { + if command.Name == app.DefaultCommand { + command.Action = devEntry + command.Flags = append(command.Flags, &cli.BoolFlag{ + Name: "ci", + Usage: "will auto quit in 10 secodes after dev service, wich is used in ci check", + }) + break + } + } + + _ = cmd.RunMainApp(app, os.Args...) +} + +func devEntry(ctx *cli.Context) error { + pwd := os.Getenv("GITEA_ROOT") + if len(pwd) == 0 { + panic(pwd) + } + log.Info("GITEA_ROOT: %s", pwd) + + defer log.GetManager().Close() + + managerCtx, cancel := context.WithCancel(context.Background()) + graceful.InitManager(managerCtx) + defer cancel() + + initDev(pwd) + + if ctx.Bool("ci") { + log.Info("ci: will auto stop in 10 seconds") + go func() { + time.Sleep(10 * time.Second) + log.Info("ci: will shutdown soon") + graceful.GetManager().DoGracefulShutdown() + }() + } + + // Set up Chi routes + webRoutes := routers.NormalRoutes() + err := runHTTP("tcp", ":3000", "Web", webRoutes, setting.UseProxyProtocol) + if err != nil { + log.Fatal("err: %#v", err) + } + + <-graceful.GetManager().Done() + log.Info("PID: %d Gitea Web Finished", os.Getpid()) + fixGitReops() + + ctxDb, cancel := context.WithCancel(context.Background()) + err = common.InitDBEngine(ctxDb) + if err != nil { + log.Fatal("common.InitDBEngine: %v", err) + } + fixUsersTestData() + err = unittest.DumpAllFixtures(filepath.Join(pwd, "models", "fixtures")) + cancel() + + if err != nil { + log.Fatal("unittest.DumpAllFixtures: %v", err) + } + removeNotNeededFixtures(pwd) + removeTmpFiles(pwd) + + log.GetManager().Close() + + return nil +} + +func removeTmpFiles(pwd string) { + _ = util.RemoveAll(path.Join(pwd, "tests", "dev")) +} + +func listSubDir(dirname string, onDir func(path, name string) error) error { + fileInfos, err := os.ReadDir(dirname) + if err != nil { + return err + } + + for _, fi := range fileInfos { + if !fi.IsDir() { + continue + } + + err = onDir(path.Join(dirname, fi.Name()), fi.Name()) + if err != nil { + return err + } + } + + return nil +} + +func fixGitReops() { + type fixItem struct { + Path string + Name string + Content string + } + + allFixs := []fixItem{ + { + Path: "hooks", + Name: "update", + Content: "#!/usr/bin/env bash\n" + + "ORI_DIR=`pwd`\n" + + "SHELL_FOLDER=$(cd \"$(dirname \"$0\")\";pwd)\n" + + "cd \"$ORI_DIR\"\n" + + "for i in `ls \"$SHELL_FOLDER/update.d\"`; do\n" + + " sh \"$SHELL_FOLDER/update.d/$i\" $1 $2 $3\n" + + "done", + }, + { + Path: "hooks", + Name: "pre-receive", + Content: "#!/usr/bin/env bash\n" + + "ORI_DIR=`pwd`\n" + + "SHELL_FOLDER=$(cd \"$(dirname \"$0\")\";pwd)\n" + + "cd \"$ORI_DIR\"\n" + + "for i in `ls \"$SHELL_FOLDER/pre-receive.d\"`; do\n" + + " sh \"$SHELL_FOLDER/pre-receive.d/$i\"\n" + + "done", + }, + { + Path: "hooks", + Name: "post-receive", + Content: "#!/usr/bin/env bash\n" + + "ORI_DIR=`pwd`\n" + + "SHELL_FOLDER=$(cd \"$(dirname \"$0\")\";pwd)\n" + + "cd \"$ORI_DIR\"\n" + + "for i in `ls \"$SHELL_FOLDER/post-receive.d\"`; do\n" + + " sh \"$SHELL_FOLDER/post-receive.d/$i\"\n" + + "done", + }, + { + Path: path.Join("hooks", "update.d"), + Name: "gitea", + Content: `#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 +`, + }, + { + Path: path.Join("hooks", "pre-receive.d"), + Name: "gitea", + Content: `#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive +`, + }, + { + Path: path.Join("hooks", "post-receive.d"), + Name: "gitea", + Content: `#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive +`, + }, + } + + neededReops := []string{ + "privated_org/private_repo_on_private_org.git", + "privated_org/public_repo_on_private_org.git", + "org3/repo5.git", + "org3/repo3.git", + "org3/action_test.git", + "user13/repo11.git", + "user27/template1.git", + "user27/repo49.git", + "org26/repo_external_tracker.git", + "org26/repo_external_tracker_alpha.git", + "org26/repo_external_tracker_numeric.git", + "limited_org/public_repo_on_limited_org.git", + "limited_org/private_repo_on_limited_org.git", + "user5/repo4.git", + "user2/readme-test.git", + "user2/utf8.git", + "user2/repo1.wiki.git", + "user2/repo15.git", + "user2/repo2.git", + "user2/repo20.git", + "user2/commitsonpr.git", + "user2/repo1.git", + "user2/glob.git", + "user2/repo16.git", + "user2/repo-release.git", + "user2/lfs.git", + "user2/git_hooks_test.git", + "user2/commits_search_test.git", + "user12/repo10.git", + "migration/lfs-test.git", + "user30/renderer.git", + "user30/empty.git", + } + + reposNotneededHooks := []string{ + "user2/repo1.wiki.git", + "user30/empty.git", + } + + err := listSubDir(setting.RepoRootPath, func(dir, userName string) error { + return listSubDir(dir, func(dir, repoName string) error { + fullName := path.Join(userName, repoName) + + if !util.SliceContainsString(neededReops, fullName) { + return util.RemoveAll(dir) + } + + if util.SliceContainsString(reposNotneededHooks, fullName) { + return util.RemoveAll(path.Join(dir, "hooks")) + } + + // proc-receive is not needed in test code now + _ = util.Remove(path.Join(dir, "hooks", "proc-receive")) + _ = util.RemoveAll(path.Join(dir, "hooks", "proc-receive.d")) + + for _, fix := range allFixs { + err := os.MkdirAll(path.Join(dir, fix.Path), os.ModePerm) + if err != nil { + return err + } + + err = os.WriteFile(path.Join(dir, fix.Path, fix.Name), []byte(fix.Content), 0o777) + if err != nil { + return err + } + } + + return nil + }) + }) + if err != nil { + log.Fatal("fixAllGiteaHook: %v", err) + } +} + +func initDev(pathToGiteaRoot string) { + setting.CustomConf = filepath.Join(pathToGiteaRoot, "tests", "dev.ini") + setting.CustomPath = pathToGiteaRoot + + setting.InitCfgProvider(setting.CustomConf) + setting.LoadCommonSettings() + + routers.InitWebInstalled(graceful.GetManager().HammerContext()) + + fixturesDir := filepath.Join(pathToGiteaRoot, "models", "fixtures") + if err := unittest.InitFixtures(unittest.FixturesOptions{ + Dir: fixturesDir, + }); err != nil { + log.Fatal("CreateTestEngine: %+v", err) + } + + if err := unittest.LoadFixtures(); err != nil { + log.Fatal("LoadFixtures: %v", err) + } + initDevUsersPasswds() + + if err := setting.PrepareAppDataPath(); err != nil { + log.Fatal("Can not prepare APP_DATA_PATH: %v", err) + } + + if err := repo_service.SyncRepositoryHooks(db.DefaultContext); err != nil { + log.Fatal("repo_service.SyncRepositoryHooks: %v", err) + } +} + +func initDevUsersPasswds() { + devUserPasswd := os.Getenv("GITEA_DEV_PASSWD") + if len(devUserPasswd) == 0 { + passwd, err := util.CryptoRandomString(20) + if err != nil { + log.Fatal("util.CryptoRandomString: %v", err) + } + + devUserPasswd = passwd + log.Info("all test users passwd: %v", devUserPasswd) + } + + err := db.Iterate(db.DefaultContext, nil, func(ctx context.Context, u *user_model.User) error { + if u.IsOrganization() { + return nil + } + + err := u.SetPassword(devUserPasswd) + if err != nil { + return err + } + + return user_model.UpdateUserCols(ctx, u, "passwd", "passwd_hash_algo", "salt") + }) + if err != nil { + log.Fatal("initDevUsersPasswds: %v", err) + } +} + +func fixUsersTestData() { + err := db.Iterate(db.DefaultContext, nil, func(ctx context.Context, u *user_model.User) error { + u.Passwd = "ZogKvWdyEx:password" + u.Salt = "ZogKvWdyEx" + u.PasswdHashAlgo = "dummy" + u.Language = "" + u.UpdatedUnix = 0 + u.CreatedUnix = 0 + u.LastLoginUnix = 0 + + if u.ID == 32 { + u.Passwd = "ZogKvWdyEx:notpassword" + } + + cols := []string{"passwd", "passwd_hash_algo", "salt", "language", "last_login_unix", "created_unix", "updated_unix"} + + if err := user_model.ValidateUser(u, cols...); err != nil { + return err + } + + _, err := db.GetEngine(ctx).ID(u.ID).Cols(cols...).NoAutoTime().Update(u) + return err + }) + if err != nil { + log.Fatal("fixUsersTestData: %v", err) + } +} + +func runHTTP(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error { + return graceful.HTTPListenAndServe(network, listenAddr, name, m, useProxyProtocol) +} + +func removeNotNeededFixtures(pathToGiteaRoot string) { + nootNeededFixtures := []string{ + "version.yml", + "app_state.yml", + "sqlite_sequence.yml", + } + keptFiles := []string{ + "gpg_key.yml", + "deploy_key.yml", + "external_login_user.yml", + "gpg_key_import.yml", + "login_source.yml", + "protected_branch.yml", + "repo_archiver.yml", + "repo_indexer_status.yml", + } + + err := filepath.Walk(path.Join(pathToGiteaRoot, "models", "fixtures"), func(pth string, info fs.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + + fileName := path.Base(pth) + if !strings.HasSuffix(fileName, ".yml") { + return nil + } + + if util.SliceContainsString(nootNeededFixtures, fileName) { + return os.Remove(pth) + } + + if util.SliceContainsString(keptFiles, fileName) { + return nil + } + + content, err := os.ReadFile(pth) + if err != nil { + return err + } + + result := make([]map[string]interface{}, 0, 10) + err = yaml.Unmarshal(content, &result) + if err != nil { + return err + } + if len(result) == 0 { + log.Info("remove empty file: %s", fileName) + return os.Remove(pth) + } + + return nil + }) + if err != nil { + log.Fatal("removeNotNeededFixtures: %v", err) + } +} diff --git a/contrib/ide/vscode/launch.json b/contrib/ide/vscode/launch.json index b80b826fc0b5e..66b7e21548ae4 100644 --- a/contrib/ide/vscode/launch.json +++ b/contrib/ide/vscode/launch.json @@ -26,6 +26,21 @@ }, "args": ["web"], "showLog": true + }, + { + "name": "Launch dev (with SQLite3)", + "type": "go", + "request": "launch", + "mode": "debug", + "buildFlags": "-tags='sqlite sqlite_unlock_notify'", + "program": "${workspaceRoot}/contrib/dev/dev.go", + "env": { + "GITEA_ROOT": "${workspaceRoot}", + "GITEA_WORK_DIR": "${workspaceRoot}" + }, + "args": ["web"], + "showLog": true, + "preLaunchTask": "generate-ini-dev" } ] } diff --git a/contrib/ide/vscode/tasks.json b/contrib/ide/vscode/tasks.json index e35ae303b27b0..04f968801faf6 100644 --- a/contrib/ide/vscode/tasks.json +++ b/contrib/ide/vscode/tasks.json @@ -44,6 +44,11 @@ "args": ["build", "-tags=\"sqlite sqlite_unlock_notify\"", "-o", "gitea.exe", "\"${workspaceRoot}\\main.go\""] }, "problemMatcher": ["$go"] + }, + { + "label": "generate-ini-dev", + "type": "shell", + "command": "make generate-ini-dev" } ] } diff --git a/models/actions/task.go b/models/actions/task.go index 69f52cf0846cf..eeb5e499f21d9 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -7,6 +7,7 @@ import ( "context" "crypto/subtle" "fmt" + "strings" "time" auth_model "code.gitea.io/gitea/models/auth" @@ -57,6 +58,29 @@ type ActionTask struct { Updated timeutil.TimeStamp `xorm:"updated index"` } +func (task *ActionTask) FixtureFieldDumper(fieldName string) ([]byte, error) { + if fieldName != "LogIndexes" { + return nil, db.ErrFixtureFieldDumperContinue + } + + data, err := task.LogIndexes.ToDB() + if err != nil { + return nil, err + } + + if len(data) == 0 { + return nil, db.ErrFixtureFieldDumperSkip + } + + builder := strings.Builder{} + fmt.Fprintf(&builder, "0x") + for _, v := range data { + fmt.Fprintf(&builder, "%02x", v) + } + + return []byte(builder.String()), nil +} + var successfulTokenTaskCache *lru.Cache[string, any] func init() { diff --git a/models/db/engine.go b/models/db/engine.go index 182d8cd993696..eac56f8cb7cd8 100755 --- a/models/db/engine.go +++ b/models/db/engine.go @@ -7,6 +7,7 @@ package db import ( "context" "database/sql" + "errors" "fmt" "io" "reflect" @@ -299,3 +300,31 @@ func SetLogSQL(ctx context.Context, on bool) { sess.Engine().ShowSQL(on) } } + +func AllTablesForEach(hanle func(info *schemas.Table, bean any) error) error { + for _, table := range tables { + info, err := TableInfo(table) + if err != nil { + return err + } + + err = hanle(info, table) + if err != nil { + return err + } + } + + return nil +} + +type FixtureFieldDumperResult int64 + +// FixtureFieldDumper custom interface to generate a fixture file +// return `ErrFixtureFieldDumperContinue` or `ErrFixtureFieldDumperSkip` for special results +type FixtureFieldDumper interface { + FixtureFieldDumper(fieldName string) ([]byte, error) +} + +var ErrFixtureFieldDumperContinue = errors.New("should continue handle with default dumper") + +var ErrFixtureFieldDumperSkip = errors.New("should skip this field") diff --git a/models/fixtures/access_token.md b/models/fixtures/access_token.md new file mode 100644 index 0000000000000..f4588a60f9855 --- /dev/null +++ b/models/fixtures/access_token.md @@ -0,0 +1,7 @@ +# tokens list + +| id | token | +| :---- | :---- | +| 1 | d2c6c1ba3890b309189a8e618c72a162e4efbf36 | +| 2 | 4c6f36e6cf498e2a448662f915d932c09c5a146c | +| 3 | 90a18faa671dc43924b795806ffe4fd169d28c91 | diff --git a/models/fixtures/access_token.yml b/models/fixtures/access_token.yml index 791b3da1c459f..5985ace63bfee 100644 --- a/models/fixtures/access_token.yml +++ b/models/fixtures/access_token.yml @@ -2,10 +2,10 @@ id: 1 uid: 1 name: Token A - #token: d2c6c1ba3890b309189a8e618c72a162e4efbf36 token_hash: 2b3668e11cb82d3af8c6e4524fc7841297668f5008d1626f0ad3417e9fa39af84c268248b78c481daa7e5dc437784003494f token_salt: QuSiZr1byZ token_last_eight: e4efbf36 + scope: '' created_unix: 946687980 updated_unix: 946687980 @@ -13,10 +13,10 @@ id: 2 uid: 1 name: Token B - #token: 4c6f36e6cf498e2a448662f915d932c09c5a146c token_hash: 1a0e32a231ebbd582dc626c1543a42d3c63d4fa76c07c72862721467c55e8f81c923d60700f0528b5f5f443f055559d3a279 token_salt: Lfwopukrq5 token_last_eight: 9c5a146c + scope: '' created_unix: 946687980 updated_unix: 946687980 @@ -24,10 +24,10 @@ id: 3 uid: 2 name: Token A - #token: 90a18faa671dc43924b795806ffe4fd169d28c91 token_hash: d6d404048048812d9e911d93aefbe94fc768d4876fdf75e3bef0bdc67828e0af422846d3056f2f25ec35c51dc92075685ec5 token_salt: 99ArgXKlQQ token_last_eight: 69d28c91 + scope: '' created_unix: 946687980 updated_unix: 946687980 -#commented out tokens so you can see what they are in plaintext + diff --git a/models/fixtures/action.yml b/models/fixtures/action.yml index af9ce93ba5c5d..fb49bef1b44cb 100644 --- a/models/fixtures/action.yml +++ b/models/fixtures/action.yml @@ -1,75 +1,108 @@ - id: 1 user_id: 2 - op_type: 12 # close issue + op_type: 12 act_user_id: 2 - repo_id: 2 # private + repo_id: 2 + comment_id: 0 + is_deleted: false is_private: true + content: '' created_unix: 1603228283 - id: 2 user_id: 3 - op_type: 2 # rename repo + op_type: 2 act_user_id: 2 - repo_id: 3 # private + repo_id: 3 + comment_id: 0 + is_deleted: false is_private: true - content: oldRepoName + content: 'oldRepoName' + created_unix: 0 - id: 3 user_id: 11 - op_type: 1 # create repo + op_type: 1 act_user_id: 11 - repo_id: 9 # public + repo_id: 9 + comment_id: 0 + is_deleted: false is_private: false + content: '' + created_unix: 0 - id: 4 user_id: 16 - op_type: 12 # close issue + op_type: 12 act_user_id: 16 - repo_id: 22 # private + repo_id: 22 + comment_id: 0 + is_deleted: false is_private: true + content: '' created_unix: 1603267920 -- id: 5 +- + id: 5 user_id: 10 - op_type: 1 # create repo + op_type: 1 act_user_id: 10 - repo_id: 6 # private + repo_id: 6 + comment_id: 0 + is_deleted: false is_private: true + content: '' created_unix: 1603010100 -- id: 6 +- + id: 6 user_id: 10 - op_type: 1 # create repo + op_type: 1 act_user_id: 10 - repo_id: 7 # private + repo_id: 7 + comment_id: 0 + is_deleted: false is_private: true + content: '' created_unix: 1603011300 -- id: 7 +- + id: 7 user_id: 10 - op_type: 1 # create repo + op_type: 1 act_user_id: 10 - repo_id: 8 # public + repo_id: 8 + comment_id: 0 + is_deleted: false is_private: false - created_unix: 1603011540 # grouped with id:7 + content: '' + created_unix: 1603011540 -- id: 8 +- + id: 8 user_id: 1 - op_type: 12 # close issue + op_type: 12 act_user_id: 1 - repo_id: 1700 # dangling intentional + repo_id: 1700 + comment_id: 0 + is_deleted: false is_private: false + content: '' created_unix: 1603011541 -- id: 9 +- + id: 9 user_id: 34 - op_type: 12 # close issue + op_type: 12 act_user_id: 34 - repo_id: 1 # public + repo_id: 1 + comment_id: 0 + is_deleted: false is_private: false + content: '4|' created_unix: 1680454039 - content: '4|' # issueId 5 + diff --git a/models/fixtures/action_run.yml b/models/fixtures/action_run.yml index 2c2151f354af6..f807373295fc9 100644 --- a/models/fixtures/action_run.yml +++ b/models/fixtures/action_run.yml @@ -1,19 +1,22 @@ - id: 791 - title: "update actions" + title: update actions repo_id: 4 owner_id: 1 - workflow_id: "artifact.yaml" + workflow_id: artifact.yaml index: 187 trigger_user_id: 1 - ref: "refs/heads/master" - commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0" - event: "push" - is_fork_pull_request: 0 + schedule_id: 0 + ref: refs/heads/master + commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 + is_fork_pull_request: false + need_approval: false + approved_by: 0 + event: push status: 1 + version: 0 started: 1683636528 stopped: 1683636626 created: 1683636108 updated: 1683636626 - need_approval: 0 - approved_by: 0 + diff --git a/models/fixtures/action_run_job.yml b/models/fixtures/action_run_job.yml index 071998b9796f9..c4910bf784f09 100644 --- a/models/fixtures/action_run_job.yml +++ b/models/fixtures/action_run_job.yml @@ -4,7 +4,7 @@ repo_id: 4 owner_id: 1 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 - is_fork_pull_request: 0 + is_fork_pull_request: false name: job_2 attempt: 1 job_id: job_2 @@ -12,3 +12,6 @@ status: 1 started: 1683636528 stopped: 1683636626 + created: 0 + updated: 0 + diff --git a/models/fixtures/action_runner_token.yml b/models/fixtures/action_runner_token.yml new file mode 100644 index 0000000000000..50fa0cb6955b9 --- /dev/null +++ b/models/fixtures/action_runner_token.yml @@ -0,0 +1,10 @@ +- + id: 1 + token: jwgxZCIsaNceopvdNarcudaLiJykDvzLH65BdcRb + owner_id: 0 + repo_id: 0 + is_active: false + created: 1692689274 + updated: 1692689274 + deleted: 0 + diff --git a/models/fixtures/action_task.yml b/models/fixtures/action_task.yml index c78fb3c5d6377..0a249c8f12936 100644 --- a/models/fixtures/action_task.yml +++ b/models/fixtures/action_task.yml @@ -3,18 +3,21 @@ job_id: 192 attempt: 3 runner_id: 1 - status: 6 # 6 is the status code for "running", running task can upload artifacts + status: 6 started: 1683636528 stopped: 1683636626 repo_id: 4 owner_id: 1 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 - is_fork_pull_request: 0 + is_fork_pull_request: false token_hash: 6d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e token_salt: jVuKnSPGgy token_last_eight: eeb1a71a log_filename: artifact-test2/2f/47.log - log_in_storage: 1 + log_in_storage: true log_length: 707 log_size: 90179 - log_expired: 0 + log_expired: false + created: 0 + updated: 0 + diff --git a/models/fixtures/attachment.yml b/models/fixtures/attachment.yml index 9ad43fa2b7eb6..ed057448da888 100644 --- a/models/fixtures/attachment.yml +++ b/models/fixtures/attachment.yml @@ -118,7 +118,7 @@ - id: 10 uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a20 - repo_id: 0 # TestGetAttachment/NotLinked + repo_id: 0 issue_id: 0 release_id: 0 uploader_id: 8 @@ -140,3 +140,4 @@ download_count: 0 size: 0 created_unix: 946684800 + diff --git a/models/fixtures/branch.yml b/models/fixtures/branch.yml index 93003049c67fb..e492051c453a8 100644 --- a/models/fixtures/branch.yml +++ b/models/fixtures/branch.yml @@ -1,47 +1,140 @@ - id: 1 repo_id: 1 - name: 'foo' - commit_id: '65f1bf27bc3bf70f64657658635e66094edbcb4d' + name: foo + commit_id: 65f1bf27bc3bf70f64657658635e66094edbcb4d commit_message: 'first commit' - commit_time: 978307100 pusher_id: 1 is_deleted: true deleted_by_id: 1 deleted_unix: 978307200 + commit_time: 978307100 + created_unix: 0 + updated_unix: 0 - id: 2 repo_id: 1 - name: 'bar' - commit_id: '62fb502a7172d4453f0322a2cc85bddffa57f07a' + name: bar + commit_id: 62fb502a7172d4453f0322a2cc85bddffa57f07a commit_message: 'second commit' - commit_time: 978307100 pusher_id: 1 is_deleted: true deleted_by_id: 99 deleted_unix: 978307200 + commit_time: 978307100 + created_unix: 0 + updated_unix: 0 - id: 3 repo_id: 1 - name: 'branch2' - commit_id: '985f0301dba5e7b34be866819cd15ad3d8f508ee' + name: branch2 + commit_id: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_message: 'make pull5 outdated' - commit_time: 1579166279 pusher_id: 1 is_deleted: false deleted_by_id: 0 deleted_unix: 0 + commit_time: 1579166279 + created_unix: 0 + updated_unix: 0 - id: 4 repo_id: 1 - name: 'master' - commit_id: '65f1bf27bc3bf70f64657658635e66094edbcb4d' + name: master + commit_id: 65f1bf27bc3bf70f64657658635e66094edbcb4d commit_message: 'Initial commit' - commit_time: 1489927679 pusher_id: 1 is_deleted: false deleted_by_id: 0 deleted_unix: 0 + commit_time: 1489927679 + created_unix: 0 + updated_unix: 0 + +- + id: 10 + repo_id: 33 + name: Plus+Is+Not+Space + commit_id: 59e2c41e8f5140bb0182acebec17c8ad9831cc62 + commit_message: 'Add more evil files' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1639616494 + created_unix: 1693719114 + updated_unix: 1693719114 + +- + id: 11 + repo_id: 33 + name: ブランチ + commit_id: 28d579e4920fbf4f66e71dab3e779d9fbf41422a + commit_message: 'Add japanese file to japanese branch only (for test too)' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1535636842 + created_unix: 1693719114 + updated_unix: 1693719114 + +- + id: 12 + repo_id: 33 + name: Grüßen + commit_id: ebf146f803fccbc1471ef01d8fa0fe12c14e61a5 + commit_message: 'Add file with cyrillic name to use as reference' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1535636032 + created_unix: 1693719114 + updated_unix: 1693719114 + +- + id: 13 + repo_id: 33 + name: ГлавнаяВетка + commit_id: ebf146f803fccbc1471ef01d8fa0fe12c14e61a5 + commit_message: 'Add file with cyrillic name to use as reference' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1535636032 + created_unix: 1693719114 + updated_unix: 1693719114 + +- + id: 14 + repo_id: 33 + name: а/б/в + commit_id: ebf146f803fccbc1471ef01d8fa0fe12c14e61a5 + commit_message: 'Add file with cyrillic name to use as reference' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1535636032 + created_unix: 1693719114 + updated_unix: 1693719114 + +- + id: 15 + repo_id: 33 + name: master + commit_id: 3aa73c3499bff049a352b4e265575373e964b89a + commit_message: 'Initial commit' + pusher_id: 0 + is_deleted: false + deleted_by_id: 0 + deleted_unix: 0 + commit_time: 1535593235 + created_unix: 1693719114 + updated_unix: 1693719114 + diff --git a/models/fixtures/collaboration.yml b/models/fixtures/collaboration.yml index ef77d22b24950..0312dadac38b1 100644 --- a/models/fixtures/collaboration.yml +++ b/models/fixtures/collaboration.yml @@ -2,46 +2,63 @@ id: 1 repo_id: 3 user_id: 2 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 2 repo_id: 4 user_id: 4 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 3 repo_id: 40 user_id: 4 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 4 repo_id: 4 user_id: 29 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 5 repo_id: 21 user_id: 15 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 6 repo_id: 21 user_id: 18 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 7 repo_id: 22 user_id: 15 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 8 repo_id: 22 user_id: 18 - mode: 2 # write + mode: 2 + created_unix: 0 + updated_unix: 0 + diff --git a/models/fixtures/comment.yml b/models/fixtures/comment.yml index bd64680c8c787..d7c2ec640d729 100644 --- a/models/fixtures/comment.yml +++ b/models/fixtures/comment.yml @@ -1,68 +1,214 @@ - id: 1 - type: 7 # label + type: 7 poster_id: 2 - issue_id: 1 # in repo_id 1 + original_author_id: 0 + issue_id: 1 label_id: 1 - content: "1" + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 + line: 0 + content: '1' created_unix: 946684810 + updated_unix: 0 + review_id: 0 + invalidated: false + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false + - id: 2 - type: 0 # comment - poster_id: 3 # user not watching (see watch.yml) - issue_id: 1 # in repo_id 1 - content: "good work!" + type: 0 + poster_id: 3 + original_author_id: 0 + issue_id: 1 + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 + line: 0 + content: good work! created_unix: 946684811 updated_unix: 946684811 + review_id: 0 + invalidated: false + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false + - id: 3 - type: 0 # comment - poster_id: 5 # user not watching (see watch.yml) - issue_id: 1 # in repo_id 1 - content: "meh..." + type: 0 + poster_id: 5 + original_author_id: 0 + issue_id: 1 + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 + line: 0 + content: meh... created_unix: 946684812 updated_unix: 946684812 + review_id: 0 + invalidated: false + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false + - id: 4 - type: 21 # code comment + type: 21 poster_id: 1 + original_author_id: 0 issue_id: 2 - content: "meh..." - review_id: 4 + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 line: 4 - tree_path: "README.md" + tree_path: README.md + content: meh... created_unix: 946684812 + updated_unix: 0 + review_id: 4 invalidated: false + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false + - id: 5 - type: 21 # code comment + type: 21 poster_id: 1 + original_author_id: 0 issue_id: 2 - content: "meh..." + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 line: -4 - tree_path: "README.md" + tree_path: README.md + content: meh... created_unix: 946684812 + updated_unix: 0 + review_id: 0 invalidated: false + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false - id: 6 - type: 21 # code comment + type: 21 poster_id: 1 + original_author_id: 0 issue_id: 2 - content: "it's already invalidated. boring..." + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 line: -4 - tree_path: "README.md" + tree_path: README.md + content: 'it''s already invalidated. boring...' created_unix: 946684812 + updated_unix: 0 + review_id: 0 invalidated: true + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false - id: 7 - type: 21 # code comment + type: 21 poster_id: 100 + original_author_id: 0 issue_id: 3 - content: "a review from a deleted user" + label_id: 0 + old_project_id: 0 + project_id: 0 + old_milestone_id: 0 + milestone_id: 0 + time_id: 0 + assignee_id: 0 + removed_assignee: false + assignee_team_id: 0 + resolve_doer_id: 0 + dependent_issue_id: 0 + commit_id: 0 line: -4 - review_id: 10 - tree_path: "README.md" + tree_path: README.md + content: a review from a deleted user created_unix: 946684812 + updated_unix: 0 + review_id: 10 invalidated: true + ref_repo_id: 0 + ref_issue_id: 0 + ref_comment_id: 0 + ref_action: 0 + ref_is_pull: false + diff --git a/models/fixtures/commit_status.yml b/models/fixtures/commit_status.yml index 20d57975ef40d..6768f91557a7d 100644 --- a/models/fixtures/commit_status.yml +++ b/models/fixtures/commit_status.yml @@ -2,53 +2,64 @@ id: 1 index: 1 repo_id: 1 - state: "pending" - sha: "1234123412341234123412341234123412341234" - target_url: https://example.com/builds/ - description: My awesome CI-service - context: ci/awesomeness + state: pending + sha: '1234123412341234123412341234123412341234' + target_url: 'https://example.com/builds/' + description: 'My awesome CI-service' + context: 'ci/awesomeness' creator_id: 2 + created_unix: 0 + updated_unix: 0 - id: 2 index: 2 repo_id: 1 - state: "warning" - sha: "1234123412341234123412341234123412341234" - target_url: https://example.com/converage/ - description: My awesome Coverage service - context: cov/awesomeness + state: warning + sha: '1234123412341234123412341234123412341234' + target_url: 'https://example.com/converage/' + description: 'My awesome Coverage service' + context: 'cov/awesomeness' creator_id: 2 + created_unix: 0 + updated_unix: 0 - id: 3 index: 3 repo_id: 1 - state: "success" - sha: "1234123412341234123412341234123412341234" - target_url: https://example.com/converage/ - description: My awesome Coverage service - context: cov/awesomeness + state: success + sha: '1234123412341234123412341234123412341234' + target_url: 'https://example.com/converage/' + description: 'My awesome Coverage service' + context: 'cov/awesomeness' creator_id: 2 + created_unix: 0 + updated_unix: 0 - id: 4 index: 4 repo_id: 1 - state: "failure" - sha: "1234123412341234123412341234123412341234" - target_url: https://example.com/builds/ - description: My awesome CI-service - context: ci/awesomeness + state: failure + sha: '1234123412341234123412341234123412341234' + target_url: 'https://example.com/builds/' + description: 'My awesome CI-service' + context: 'ci/awesomeness' creator_id: 2 + created_unix: 0 + updated_unix: 0 - id: 5 index: 5 repo_id: 1 - state: "error" - sha: "1234123412341234123412341234123412341234" - target_url: https://example.com/builds/ - description: My awesome deploy service - context: deploy/awesomeness + state: error + sha: '1234123412341234123412341234123412341234' + target_url: 'https://example.com/builds/' + description: 'My awesome deploy service' + context: 'deploy/awesomeness' creator_id: 2 + created_unix: 0 + updated_unix: 0 + diff --git a/models/fixtures/commit_status_index.yml b/models/fixtures/commit_status_index.yml index 3f252e87ef092..21ab0a9883673 100644 --- a/models/fixtures/commit_status_index.yml +++ b/models/fixtures/commit_status_index.yml @@ -1,5 +1,6 @@ - id: 1 repo_id: 1 - sha: "1234123412341234123412341234123412341234" - max_index: 5 \ No newline at end of file + sha: '1234123412341234123412341234123412341234' + max_index: 5 + diff --git a/models/fixtures/email_address.yml b/models/fixtures/email_address.yml index ce4d5208df393..d750a54e82ffd 100644 --- a/models/fixtures/email_address.yml +++ b/models/fixtures/email_address.yml @@ -285,3 +285,4 @@ lower_email: abcde@gitea.com is_activated: true is_primary: false + diff --git a/models/fixtures/follow.yml b/models/fixtures/follow.yml index b8d35828bf170..d4f41404be372 100644 --- a/models/fixtures/follow.yml +++ b/models/fixtures/follow.yml @@ -2,18 +2,23 @@ id: 1 user_id: 4 follow_id: 2 + created_unix: 0 - id: 2 user_id: 8 follow_id: 2 + created_unix: 0 - id: 3 user_id: 2 follow_id: 8 + created_unix: 0 - id: 4 user_id: 31 follow_id: 33 + created_unix: 0 + diff --git a/models/fixtures/gpg_key.yml b/models/fixtures/gpg_key.yml index 2d54313fdf1c7..1b63b5f786408 100644 --- a/models/fixtures/gpg_key.yml +++ b/models/fixtures/gpg_key.yml @@ -2,8 +2,10 @@ id: 5 owner_id: 36 key_id: B15431642629B826 - primary_key_id: content: xsDNBGTrY3UBDAC2HLBqmMplAV15qSnC7g1c4dV406f5EHNhFr95Nup2My6b2eafTlvedv77s8PT/I7F3fy4apOZs5A7w2SsPlLMcQ3ev4uGOsxRtkq5RLy1Yb6SNueX0Da2UVKR5KTC5Q6BWaqxwS0IjKOLZ/xz0Pbe/ClV3bZSKBEY2omkVo3Z0HZ771vB2clPRvGJ/IdeKOsZ3ZytSFXfyiJBdARmeSPmydXLil8+Ibq5iLAeow5PK8hK1TCOnKHzLWNqcNq70tyjoHvcGi70iGjoVEEUgPCLLuU8WmzTJwlvA3BuDzjtaO7TLo/jdE6iqkHtMSS8x+43sAH6hcFRCWAVh/0Uq7n36uGDfNxGnX3YrmX3LR9x5IsBES1rGGWbpxio4o5GIf/Xd+JgDd9rzJCqRuZ3/sW/TxK38htWaVNZV0kMkHUCTc1ctzWpCm635hbFCHBhPYIp+/z206khkAKDbz/CNuU91Wazsh7KO07wrwDtxfDDbInJ8TfHE2TGjzjQzgChfmcAEQEAAQ== + created_unix: 0 + expired_unix: 0 + added_unix: 0 verified: true can_sign: true can_encrypt_comms: true @@ -16,8 +18,12 @@ key_id: EE3AF48454AFD619 primary_key_id: B15431642629B826 content: zsDNBGTrY3UBDADsHrzuOicQaPdUQm0+0UNrs92cESm/j/4yBBUk+sfLZAo6J99c4eh4nAQzzZ7al080rYKB0G+7xoRz1eHcQH6zrVcqB8KYtf/sdY47WaMiMyxM+kTSvzp7tsv7QuSQZ0neUEXRyYMz5ttBfIjWUd+3NDItuHyB+MtNWlS3zXgaUbe5VifqKaNmzN0Ye4yXTKcpypE3AOqPVz+iIFv3c6TmsqLHJaR4VoicCleAqLyF/28WsJO7M9dDW+EM3MZVnsVpycTURyHAJGfSk10waQZAaRwmarCN/q0KEJ+aEAK/SRliUneBZoMO5hY5iBeG432tofwaQqAahPv9uXIb1n2JEMKwnMlMA9UGD1AcDbywfj1m/ZGBBw95i4Ekkfn43RvV3THr7uJU/dRqqP+iic4MwpUrOxqELW/kmeHXlBcNbZZhEEvwRoW7U2/9eeuog4nRleRJ0pi/xOP9wmxkKjaIPIK3phdBtEpVk4w/UTAWNdyIIrFggukeAnZFyGJwlm8AEQEAAQ== + created_unix: 0 + expired_unix: 0 + added_unix: 0 verified: true can_sign: true can_encrypt_comms: true can_encrypt_storage: true can_certify: true + diff --git a/models/fixtures/hook_task.yml b/models/fixtures/hook_task.yml index 6dbb10151abf8..76704d0b1fbc2 100644 --- a/models/fixtures/hook_task.yml +++ b/models/fixtures/hook_task.yml @@ -2,4 +2,8 @@ id: 1 hook_id: 1 uuid: uuid1 + event_type: '' is_delivered: true + delivered: 0 + is_succeed: false + diff --git a/models/fixtures/issue.yml b/models/fixtures/issue.yml index fa72f9b647da0..c1bc0d3799302 100644 --- a/models/fixtures/issue.yml +++ b/models/fixtures/issue.yml @@ -11,8 +11,11 @@ is_closed: false is_pull: false num_comments: 2 + pin_order: 0 + deadline_unix: 0 created_unix: 946684800 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -28,8 +31,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684810 updated_unix: 978307190 + closed_unix: 0 is_locked: false - @@ -45,8 +51,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684820 updated_unix: 978307180 + closed_unix: 0 is_locked: false - @@ -62,8 +71,11 @@ is_closed: true is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684830 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -79,8 +91,11 @@ is_closed: true is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684840 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -96,8 +111,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684850 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -113,8 +131,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684830 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -130,8 +151,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684820 updated_unix: 978307180 + closed_unix: 0 is_locked: false - @@ -147,8 +171,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684820 updated_unix: 978307180 + closed_unix: 0 is_locked: false - @@ -164,9 +191,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 deadline_unix: 1019307200 created_unix: 946684830 updated_unix: 999307200 + closed_unix: 0 is_locked: false - @@ -182,8 +211,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1579194806 updated_unix: 1579194806 + closed_unix: 0 is_locked: false - @@ -199,8 +231,11 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -210,14 +245,17 @@ poster_id: 2 original_author_id: 0 name: issue in active repo - content: we'll be testing github issue 13171 with this. + content: 'we''ll be testing github issue 13171 with this.' milestone_id: 0 priority: 0 is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -227,14 +265,17 @@ poster_id: 2 original_author_id: 0 name: issue in archived repo - content: we'll be testing github issue 13171 with this. + content: 'we''ll be testing github issue 13171 with this.' milestone_id: 0 priority: 0 is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -250,8 +291,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -267,8 +311,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -284,8 +331,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 1602935696 updated_unix: 1602935696 + closed_unix: 0 is_locked: false - @@ -301,8 +351,11 @@ is_closed: false is_pull: false num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684830 updated_unix: 978307200 + closed_unix: 0 is_locked: false - @@ -318,6 +371,10 @@ is_closed: false is_pull: true num_comments: 0 + pin_order: 0 + deadline_unix: 0 created_unix: 946684830 updated_unix: 978307200 + closed_unix: 0 is_locked: false + diff --git a/models/fixtures/issue_assignees.yml b/models/fixtures/issue_assignees.yml index e5d36f921a7e0..609569e483efb 100644 --- a/models/fixtures/issue_assignees.yml +++ b/models/fixtures/issue_assignees.yml @@ -2,15 +2,19 @@ id: 1 assignee_id: 1 issue_id: 1 + - id: 2 assignee_id: 1 issue_id: 6 + - id: 3 assignee_id: 2 issue_id: 6 + - id: 4 assignee_id: 2 issue_id: 17 + diff --git a/models/fixtures/issue_index.yml b/models/fixtures/issue_index.yml index de6e955804ab6..02b2d9b5dc4a4 100644 --- a/models/fixtures/issue_index.yml +++ b/models/fixtures/issue_index.yml @@ -1,27 +1,36 @@ - group_id: 1 max_index: 5 + - group_id: 2 max_index: 2 + - group_id: 3 max_index: 2 + - group_id: 10 max_index: 1 + - group_id: 32 max_index: 2 + - - group_id: 48 + group_id: 42 max_index: 1 + - - group_id: 42 + group_id: 48 max_index: 1 + - group_id: 50 max_index: 1 + - group_id: 51 max_index: 1 + diff --git a/models/fixtures/issue_label.yml b/models/fixtures/issue_label.yml index f4ecb1f923232..6138a2083012f 100644 --- a/models/fixtures/issue_label.yml +++ b/models/fixtures/issue_label.yml @@ -17,3 +17,4 @@ id: 4 issue_id: 2 label_id: 4 + diff --git a/models/fixtures/issue_user.yml b/models/fixtures/issue_user.yml index 64824316ea275..47550664456de 100644 --- a/models/fixtures/issue_user.yml +++ b/models/fixtures/issue_user.yml @@ -18,3 +18,4 @@ issue_id: 1 is_read: false is_mentioned: true + diff --git a/models/fixtures/issue_watch.yml b/models/fixtures/issue_watch.yml index 4bc3ff1b8b987..804e3c61c4b64 100644 --- a/models/fixtures/issue_watch.yml +++ b/models/fixtures/issue_watch.yml @@ -29,3 +29,4 @@ is_watching: false created_unix: 946684800 updated_unix: 946684800 + diff --git a/models/fixtures/label.yml b/models/fixtures/label.yml index 2242b90dcdc23..62bc708a78a53 100644 --- a/models/fixtures/label.yml +++ b/models/fixtures/label.yml @@ -3,10 +3,12 @@ repo_id: 1 org_id: 0 name: label1 - color: '#abcdef' exclusive: false + color: '#abcdef' num_issues: 2 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -14,10 +16,12 @@ repo_id: 1 org_id: 0 name: label2 - color: '#000000' exclusive: false + color: '#000000' num_issues: 1 num_closed_issues: 1 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -25,10 +29,12 @@ repo_id: 0 org_id: 3 name: orglabel3 - color: '#abcdef' exclusive: false + color: '#abcdef' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -36,10 +42,12 @@ repo_id: 0 org_id: 3 name: orglabel4 - color: '#000000' exclusive: false + color: '#000000' num_issues: 1 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -47,10 +55,12 @@ repo_id: 10 org_id: 0 name: pull-test-label - color: '#000000' exclusive: false + color: '#000000' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -58,10 +68,12 @@ repo_id: 55 org_id: 0 name: unscoped_label - color: '#000000' exclusive: false + color: '#000000' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -69,10 +81,12 @@ repo_id: 55 org_id: 0 name: scope/label1 - color: '#000000' exclusive: true + color: '#000000' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -80,10 +94,12 @@ repo_id: 55 org_id: 0 name: scope/label2 - color: '#000000' exclusive: true + color: '#000000' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 - @@ -91,8 +107,11 @@ repo_id: 55 org_id: 0 name: scope/subscope/label2 - color: '#000000' exclusive: true + color: '#000000' num_issues: 0 num_closed_issues: 0 + created_unix: 0 + updated_unix: 0 archived_unix: 0 + diff --git a/models/fixtures/language_stat.yml b/models/fixtures/language_stat.yml new file mode 100644 index 0000000000000..a2ea98b41ec2a --- /dev/null +++ b/models/fixtures/language_stat.yml @@ -0,0 +1,36 @@ +- + id: 1 + repo_id: 49 + commit_id: aacbdfe9e1c4b47f60abe81849045fa4e96f1d75 + is_primary: true + language: Text + size: 14 + created_unix: 1692437698 + +- + id: 2 + repo_id: 44 + commit_id: 2a83b349fa234131fc5db6f2a0498d3f4d3d6038 + is_primary: true + language: Text + size: 14 + created_unix: 1692437699 + +- + id: 3 + repo_id: 42 + commit_id: ef6b814b610d8e7717aa0f71fbe5842bcf814697 + is_primary: true + language: Text + size: 36 + created_unix: 1692437699 + +- + id: 4 + repo_id: 2 + commit_id: 1032bbf17fbc0d9c95bb5418dabe8f8c99278700 + is_primary: true + language: Markdown + size: 36 + created_unix: 1692437700 + diff --git a/models/fixtures/lfs_meta_object.yml b/models/fixtures/lfs_meta_object.yml index 1c29e02d44da6..f60215319509b 100644 --- a/models/fixtures/lfs_meta_object.yml +++ b/models/fixtures/lfs_meta_object.yml @@ -1,6 +1,4 @@ -# These are the LFS objects in user2/lfs.git - - id: 1 oid: 0b8d8b5f15046343fd32f451df93acc2bdd9e6373be478b968e4cad6b6647351 size: 107 @@ -8,7 +6,6 @@ created_unix: 1671607299 - - id: 2 oid: 2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c size: 107 @@ -16,7 +13,6 @@ created_unix: 1671607299 - - id: 3 oid: 7b6b2c88dba9f760a1a58469b67fee2b698ef7e9399c4ca4f34a14ccbe39f623 size: 27 @@ -24,9 +20,9 @@ created_unix: 1671607299 - - id: 4 oid: 9d172e5c64b4f0024b9901ec6afe9ea052f3c9b6ff9f4b07956d8c48c86fca82 size: 25 repository_id: 54 created_unix: 1671607299 + diff --git a/models/fixtures/milestone.yml b/models/fixtures/milestone.yml index 87c30cc96c4ac..768a349643267 100644 --- a/models/fixtures/milestone.yml +++ b/models/fixtures/milestone.yml @@ -2,53 +2,69 @@ id: 1 repo_id: 1 name: milestone1 - content: content1 + content: 'content1' is_closed: false num_issues: 1 num_closed_issues: 0 completeness: 0 + created_unix: 0 + updated_unix: 0 deadline_unix: 253370764800 + closed_date_unix: 0 - id: 2 repo_id: 1 name: milestone2 - content: content2 + content: 'content2' is_closed: false num_issues: 0 num_closed_issues: 0 completeness: 0 + created_unix: 0 + updated_unix: 0 deadline_unix: 253370764800 + closed_date_unix: 0 - id: 3 repo_id: 1 name: milestone3 - content: content3 + content: 'content3' is_closed: true num_issues: 1 num_closed_issues: 0 completeness: 0 + created_unix: 0 + updated_unix: 0 deadline_unix: 253370764800 + closed_date_unix: 0 - id: 4 repo_id: 42 name: milestone of repo42 - content: content random + content: 'content random' is_closed: false num_issues: 0 num_closed_issues: 0 completeness: 0 + created_unix: 0 + updated_unix: 0 deadline_unix: 253370764800 + closed_date_unix: 0 - id: 5 repo_id: 10 name: milestone of repo 10 - content: for testing with PRs + content: 'for testing with PRs' is_closed: false num_issues: 0 num_closed_issues: 0 completeness: 0 + created_unix: 0 + updated_unix: 0 deadline_unix: 253370764800 + closed_date_unix: 0 + diff --git a/models/fixtures/mirror.yml b/models/fixtures/mirror.yml index 97bc4ae60dda2..811bf90a75462 100644 --- a/models/fixtures/mirror.yml +++ b/models/fixtures/mirror.yml @@ -6,7 +6,7 @@ updated_unix: 0 next_update_unix: 0 lfs_enabled: false - lfs_endpoint: "" + lfs_endpoint: '' - id: 2 @@ -16,7 +16,7 @@ updated_unix: 0 next_update_unix: 0 lfs_enabled: false - lfs_endpoint: "" + lfs_endpoint: '' - id: 3 @@ -26,7 +26,7 @@ updated_unix: 0 next_update_unix: 0 lfs_enabled: false - lfs_endpoint: "" + lfs_endpoint: '' - id: 4 @@ -36,7 +36,7 @@ updated_unix: 0 next_update_unix: 0 lfs_enabled: false - lfs_endpoint: "" + lfs_endpoint: '' - id: 5 @@ -46,4 +46,5 @@ updated_unix: 0 next_update_unix: 0 lfs_enabled: false - lfs_endpoint: "" + lfs_endpoint: '' + diff --git a/models/fixtures/notice.yml b/models/fixtures/notice.yml index af08f07bfa137..7e8323dad2df6 100644 --- a/models/fixtures/notice.yml +++ b/models/fixtures/notice.yml @@ -1,14 +1,18 @@ - id: 1 - type: 1 # NoticeRepository - description: description1 + type: 1 + description: 'description1' + created_unix: 0 - id: 2 - type: 1 # NoticeRepository - description: description2 + type: 1 + description: 'description2' + created_unix: 0 - id: 3 - type: 1 # NoticeRepository - description: description3 + type: 1 + description: 'description3' + created_unix: 0 + diff --git a/models/fixtures/notification.yml b/models/fixtures/notification.yml index bd279d4bb284c..41da5f8a3c001 100644 --- a/models/fixtures/notification.yml +++ b/models/fixtures/notification.yml @@ -2,10 +2,11 @@ id: 1 user_id: 1 repo_id: 1 - status: 1 # unread - source: 1 # issue - updated_by: 2 + status: 1 + source: 1 issue_id: 1 + comment_id: 0 + updated_by: 2 created_unix: 946684800 updated_unix: 946684820 @@ -13,10 +14,11 @@ id: 2 user_id: 2 repo_id: 1 - status: 2 # read - source: 1 # issue - updated_by: 1 + status: 2 + source: 1 issue_id: 2 + comment_id: 0 + updated_by: 1 created_unix: 946685800 updated_unix: 946685820 @@ -24,10 +26,11 @@ id: 3 user_id: 2 repo_id: 1 - status: 3 # pinned - source: 1 # issue - updated_by: 1 + status: 3 + source: 1 issue_id: 3 + comment_id: 0 + updated_by: 1 created_unix: 946686800 updated_unix: 946686800 @@ -35,10 +38,11 @@ id: 4 user_id: 2 repo_id: 1 - status: 1 # unread - source: 1 # issue - updated_by: 1 + status: 1 + source: 1 issue_id: 5 + comment_id: 0 + updated_by: 1 created_unix: 946687800 updated_unix: 946687800 @@ -46,9 +50,11 @@ id: 5 user_id: 2 repo_id: 2 - status: 1 # unread - source: 1 # issue - updated_by: 5 + status: 1 + source: 1 issue_id: 4 + comment_id: 0 + updated_by: 5 created_unix: 946688800 updated_unix: 946688820 + diff --git a/models/fixtures/oauth2_application.md b/models/fixtures/oauth2_application.md new file mode 100644 index 0000000000000..dc065e451d587 --- /dev/null +++ b/models/fixtures/oauth2_application.md @@ -0,0 +1 @@ +# Code Verifier: N1Zo9-8Rfwhkt68r1r29ty8YwIraXR8eh_1Qwxg7yQXsonBt diff --git a/models/fixtures/oauth2_application.yml b/models/fixtures/oauth2_application.yml index 2f38cb58b6169..cc3b906b415dc 100644 --- a/models/fixtures/oauth2_application.yml +++ b/models/fixtures/oauth2_application.yml @@ -1,20 +1,22 @@ - id: 1 uid: 1 - name: "Test" - client_id: "da7da3ba-9a13-4167-856f-3899de0b0138" - client_secret: "$2a$10$UYRgUSgekzBp6hYe8pAdc.cgB4Gn06QRKsORUnIYTYQADs.YR/uvi" # bcrypt of "4MK8Na6R55smdCY0WuCCumZ6hjRPnGY5saWVRHHjJiA= - redirect_uris: '["a", "https://example.com/xyzzy"]' + name: Test + client_id: da7da3ba-9a13-4167-856f-3899de0b0138 + client_secret: $2a$10$UYRgUSgekzBp6hYe8pAdc.cgB4Gn06QRKsORUnIYTYQADs.YR/uvi + confidential_client: true + redirect_uris: '["a","https://example.com/xyzzy"]' created_unix: 1546869730 updated_unix: 1546869730 - confidential_client: true + - id: 2 uid: 2 - name: "Test native app" - client_id: "ce5a1322-42a7-11ed-b878-0242ac120002" - client_secret: "$2a$10$UYRgUSgekzBp6hYe8pAdc.cgB4Gn06QRKsORUnIYTYQADs.YR/uvi" # bcrypt of "4MK8Na6R55smdCY0WuCCumZ6hjRPnGY5saWVRHHjJiA= + name: Test native app + client_id: ce5a1322-42a7-11ed-b878-0242ac120002 + client_secret: $2a$10$UYRgUSgekzBp6hYe8pAdc.cgB4Gn06QRKsORUnIYTYQADs.YR/uvi + confidential_client: false redirect_uris: '["http://127.0.0.1"]' created_unix: 1546869730 updated_unix: 1546869730 - confidential_client: false + diff --git a/models/fixtures/oauth2_authorization_code.yml b/models/fixtures/oauth2_authorization_code.yml index d29502164e67f..db73bded0e2e8 100644 --- a/models/fixtures/oauth2_authorization_code.yml +++ b/models/fixtures/oauth2_authorization_code.yml @@ -1,15 +1,18 @@ -- id: 1 +- + id: 1 grant_id: 1 - code: "authcode" - code_challenge: "CjvyTLSdR47G5zYenDA-eDWW4lRrO8yvjcWwbD_deOg" # Code Verifier: N1Zo9-8Rfwhkt68r1r29ty8YwIraXR8eh_1Qwxg7yQXsonBt - code_challenge_method: "S256" - redirect_uri: "a" + code: authcode + code_challenge: CjvyTLSdR47G5zYenDA-eDWW4lRrO8yvjcWwbD_deOg + code_challenge_method: S256 + redirect_uri: a valid_until: 3546869730 -- id: 2 +- + id: 2 grant_id: 4 - code: "authcodepublic" - code_challenge: "CjvyTLSdR47G5zYenDA-eDWW4lRrO8yvjcWwbD_deOg" # Code Verifier: N1Zo9-8Rfwhkt68r1r29ty8YwIraXR8eh_1Qwxg7yQXsonBt - code_challenge_method: "S256" - redirect_uri: "http://127.0.0.1/" + code: authcodepublic + code_challenge: CjvyTLSdR47G5zYenDA-eDWW4lRrO8yvjcWwbD_deOg + code_challenge_method: S256 + redirect_uri: http://127.0.0.1/ valid_until: 3546869730 + diff --git a/models/fixtures/oauth2_grant.yml b/models/fixtures/oauth2_grant.yml index e63286878b20f..593ee37185ef4 100644 --- a/models/fixtures/oauth2_grant.yml +++ b/models/fixtures/oauth2_grant.yml @@ -1,31 +1,40 @@ -- id: 1 +- + id: 1 user_id: 1 application_id: 1 counter: 1 - scope: "openid profile" + scope: 'openid profile' + nonce: '' created_unix: 1546869730 updated_unix: 1546869730 -- id: 2 +- + id: 2 user_id: 3 application_id: 1 counter: 1 - scope: "openid" + scope: 'openid' + nonce: '' created_unix: 1546869730 updated_unix: 1546869730 -- id: 3 +- + id: 3 user_id: 5 application_id: 1 counter: 1 - scope: "openid profile email" + scope: 'openid profile email' + nonce: '' created_unix: 1546869730 updated_unix: 1546869730 -- id: 4 +- + id: 4 user_id: 99 application_id: 2 counter: 1 - scope: "whatever" + scope: 'whatever' + nonce: '' created_unix: 1546869730 updated_unix: 1546869730 + diff --git a/models/fixtures/org_user.yml b/models/fixtures/org_user.yml index 8d58169a32f17..46f515c3aea22 100644 --- a/models/fixtures/org_user.yml +++ b/models/fixtures/org_user.yml @@ -99,3 +99,4 @@ uid: 5 org_id: 36 is_public: true + diff --git a/models/fixtures/project.yml b/models/fixtures/project.yml index 1bf8030f6aa57..f53e83a2c5e37 100644 --- a/models/fixtures/project.yml +++ b/models/fixtures/project.yml @@ -1,47 +1,60 @@ - id: 1 title: First project + description: '' owner_id: 0 repo_id: 1 - is_closed: false creator_id: 2 + is_closed: false board_type: 1 + card_type: 0 type: 2 created_unix: 1688973030 updated_unix: 1688973030 + closed_date_unix: 0 - id: 2 title: second project + description: '' owner_id: 0 repo_id: 3 - is_closed: false creator_id: 3 + is_closed: false board_type: 1 + card_type: 0 type: 2 created_unix: 1688973010 updated_unix: 1688973010 + closed_date_unix: 0 - id: 3 title: project on repo with disabled project + description: '' owner_id: 0 repo_id: 4 - is_closed: true creator_id: 5 + is_closed: true board_type: 1 + card_type: 0 type: 2 created_unix: 1688973020 updated_unix: 1688973020 + closed_date_unix: 0 - id: 4 title: project on user2 + description: '' owner_id: 2 repo_id: 0 - is_closed: false creator_id: 2 + is_closed: false board_type: 1 + card_type: 0 type: 2 created_unix: 1688973000 updated_unix: 1688973000 + closed_date_unix: 0 + diff --git a/models/fixtures/project_board.yml b/models/fixtures/project_board.yml index dc4f9cf565d7d..f2a3951c346fe 100644 --- a/models/fixtures/project_board.yml +++ b/models/fixtures/project_board.yml @@ -1,31 +1,40 @@ - id: 1 - project_id: 1 title: To Do + default: false + sorting: 0 + project_id: 1 creator_id: 2 created_unix: 1588117528 updated_unix: 1588117528 - id: 2 - project_id: 1 title: In Progress + default: false + sorting: 0 + project_id: 1 creator_id: 2 created_unix: 1588117528 updated_unix: 1588117528 - id: 3 - project_id: 1 title: Done + default: false + sorting: 0 + project_id: 1 creator_id: 2 created_unix: 1588117528 updated_unix: 1588117528 - id: 4 - project_id: 4 title: Done + default: false + sorting: 0 + project_id: 4 creator_id: 2 created_unix: 1588117528 updated_unix: 1588117528 + diff --git a/models/fixtures/project_issue.yml b/models/fixtures/project_issue.yml index b1af05908aafb..50b2138c92b59 100644 --- a/models/fixtures/project_issue.yml +++ b/models/fixtures/project_issue.yml @@ -3,21 +3,26 @@ issue_id: 1 project_id: 1 project_board_id: 1 + sorting: 0 - id: 2 issue_id: 2 project_id: 1 - project_board_id: 0 # no board assigned + project_board_id: 0 + sorting: 0 - id: 3 issue_id: 3 project_id: 1 project_board_id: 2 + sorting: 0 - id: 4 issue_id: 5 project_id: 1 project_board_id: 3 + sorting: 0 + diff --git a/models/fixtures/public_key.yml b/models/fixtures/public_key.yml index 08f5c349a7b3d..b35d307ad6f87 100644 --- a/models/fixtures/public_key.yml +++ b/models/fixtures/public_key.yml @@ -2,10 +2,12 @@ id: 1 owner_id: 2 name: user2@localhost - fingerprint: "SHA256:M3iiFbqQKgLxi+WAoRa38ZVQ9ktdfau2sOu9xuPb9ew" - content: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWVj0fQ5N8wNc0LVNA41wDLYJ89ZIbejrPfg/avyj3u/ZohAKsQclxG4Ju0VirduBFF9EOiuxoiFBRr3xRpqzpsZtnMPkWVWb+akZwBFAx8p+jKdy4QXR/SZqbVobrGwip2UjSrri1CtBxpJikojRIZfCnDaMOyd9Jp6KkujvniFzUWdLmCPxUE9zhTaPu0JsEP7MW0m6yx7ZUhHyfss+NtqmFTaDO+QlMR7L2QkDliN2Jl3Xa3PhuWnKJfWhdAq1Cw4oraKUOmIgXLkuiuxVQ6mD3AiFupkmfqdHq6h+uHHmyQqv3gU+/sD8GbGAhf6ftqhTsXjnv1Aj4R8NoDf9BS6KRkzkeun5UisSzgtfQzjOMEiJtmrep2ZQrMGahrXa+q4VKr0aKJfm+KlLfwm/JztfsBcqQWNcTURiCFqz+fgZw0Ey/de0eyMzldYTdXXNRYCKjs9bvBK+6SSXRM7AhftfQ0ZuoW5+gtinPrnmoOaSCEJbAiEiTO/BzOHgowiM= user2@localhost" + fingerprint: SHA256:M3iiFbqQKgLxi+WAoRa38ZVQ9ktdfau2sOu9xuPb9ew + content: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWVj0fQ5N8wNc0LVNA41wDLYJ89ZIbejrPfg/avyj3u/ZohAKsQclxG4Ju0VirduBFF9EOiuxoiFBRr3xRpqzpsZtnMPkWVWb+akZwBFAx8p+jKdy4QXR/SZqbVobrGwip2UjSrri1CtBxpJikojRIZfCnDaMOyd9Jp6KkujvniFzUWdLmCPxUE9zhTaPu0JsEP7MW0m6yx7ZUhHyfss+NtqmFTaDO+QlMR7L2QkDliN2Jl3Xa3PhuWnKJfWhdAq1Cw4oraKUOmIgXLkuiuxVQ6mD3AiFupkmfqdHq6h+uHHmyQqv3gU+/sD8GbGAhf6ftqhTsXjnv1Aj4R8NoDf9BS6KRkzkeun5UisSzgtfQzjOMEiJtmrep2ZQrMGahrXa+q4VKr0aKJfm+KlLfwm/JztfsBcqQWNcTURiCFqz+fgZw0Ey/de0eyMzldYTdXXNRYCKjs9bvBK+6SSXRM7AhftfQ0ZuoW5+gtinPrnmoOaSCEJbAiEiTO/BzOHgowiM= user2@localhost mode: 2 type: 1 + login_source_id: 0 created_unix: 1559593109 updated_unix: 1565224552 - login_source_id: 0 \ No newline at end of file + verified: false + diff --git a/models/fixtures/pull_request.yml b/models/fixtures/pull_request.yml index e5589ac703d77..4ee181995c110 100644 --- a/models/fixtures/pull_request.yml +++ b/models/fixtures/pull_request.yml @@ -1,7 +1,9 @@ - id: 1 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 2 index: 2 head_repo_id: 1 @@ -9,13 +11,18 @@ head_branch: branch1 base_branch: master merge_base: 4a357436d925b5c974181ff12a994538ddc5a269 + allow_maintainer_edit: false has_merged: true merger_id: 2 + merged_unix: 0 + flow: 0 - id: 2 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 3 index: 3 head_repo_id: 1 @@ -23,12 +30,18 @@ head_branch: branch2 base_branch: master merge_base: 4a357436d925b5c974181ff12a994538ddc5a269 + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 - id: 3 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 8 index: 1 head_repo_id: 11 @@ -36,12 +49,18 @@ head_branch: branch2 base_branch: master merge_base: 0abcb056019adb83 + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 - id: 4 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 9 index: 1 head_repo_id: 48 @@ -49,12 +68,18 @@ head_branch: branch1 base_branch: master merge_base: abcdef1234567890 + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 - - id: 5 # this PR is outdated (one commit behind branch1 ) - type: 0 # gitea pull request - status: 2 # mergable + id: 5 + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 11 index: 5 head_repo_id: 1 @@ -62,12 +87,18 @@ head_branch: pr-to-update base_branch: branch2 merge_base: 985f0301dba5e7b34be866819cd15ad3d8f508ee + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 - id: 6 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 12 index: 2 head_repo_id: 3 @@ -75,12 +106,18 @@ head_branch: test_branch base_branch: master merge_base: 2a47ca4b614a9f5a + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 - id: 7 - type: 0 # gitea pull request - status: 2 # mergable + type: 0 + status: 2 + commits_ahead: 0 + commits_behind: 0 issue_id: 19 index: 1 head_repo_id: 58 @@ -88,4 +125,9 @@ head_branch: branch1 base_branch: main merge_base: cbff181af4c9c7fee3cf6c106699e07d9a3f54e6 + allow_maintainer_edit: false has_merged: false + merger_id: 0 + merged_unix: 0 + flow: 0 + diff --git a/models/fixtures/reaction.yml b/models/fixtures/reaction.yml index 4925935fe6fe6..7b84db7a3dd97 100644 --- a/models/fixtures/reaction.yml +++ b/models/fixtures/reaction.yml @@ -1,39 +1,45 @@ - - id: 1 #issue reaction - type: zzz # not allowed reaction (added before allowed reaction list has changed) + id: 1 + type: zzz issue_id: 1 comment_id: 0 user_id: 2 + original_author_id: 0 created_unix: 1573248001 - - id: 2 #issue reaction - type: zzz # not allowed reaction (added before allowed reaction list has changed) + id: 2 + type: zzz issue_id: 1 comment_id: 0 user_id: 1 + original_author_id: 0 created_unix: 1573248002 - - id: 3 #issue reaction - type: eyes # allowed reaction + id: 3 + type: eyes issue_id: 1 comment_id: 0 user_id: 2 + original_author_id: 0 created_unix: 1573248003 - - id: 4 #comment reaction - type: laugh # allowed reaction + id: 4 + type: laugh issue_id: 1 comment_id: 2 user_id: 2 + original_author_id: 0 created_unix: 1573248004 - - id: 5 #comment reaction - type: laugh # allowed reaction + id: 5 + type: laugh issue_id: 1 comment_id: 2 user_id: 1 + original_author_id: 0 created_unix: 1573248005 + diff --git a/models/fixtures/release.yml b/models/fixtures/release.yml index 4ed7df440dbd3..761e036f1b59e 100644 --- a/models/fixtures/release.yml +++ b/models/fixtures/release.yml @@ -1,138 +1,168 @@ -- id: 1 +- + id: 1 repo_id: 1 publisher_id: 2 - tag_name: "v1.1" - lower_tag_name: "v1.1" - target: "master" - title: "testing-release" - sha1: "65f1bf27bc3bf70f64657658635e66094edbcb4d" + tag_name: v1.1 + original_author_id: 0 + lower_tag_name: v1.1 + target: master + title: testing-release + sha1: 65f1bf27bc3bf70f64657658635e66094edbcb4d num_commits: 10 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684800 -- id: 2 +- + id: 2 repo_id: 40 publisher_id: 2 - tag_name: "v1.1" - lower_tag_name: "v1.1" - target: "master" - title: "testing-release" - sha1: "65f1bf27bc3bf70f64657658635e66094edbcb4d" + tag_name: v1.1 + original_author_id: 0 + lower_tag_name: v1.1 + target: master + title: testing-release + sha1: 65f1bf27bc3bf70f64657658635e66094edbcb4d num_commits: 10 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684800 -- id: 3 +- + id: 3 repo_id: 1 publisher_id: 2 - tag_name: "delete-tag" - lower_tag_name: "delete-tag" - target: "master" - title: "delete-tag" - sha1: "65f1bf27bc3bf70f64657658635e66094edbcb4d" + tag_name: delete-tag + original_author_id: 0 + lower_tag_name: delete-tag + target: master + title: delete-tag + sha1: 65f1bf27bc3bf70f64657658635e66094edbcb4d num_commits: 10 + note: '' is_draft: false is_prerelease: false is_tag: true created_unix: 946684800 -- id: 4 +- + id: 4 repo_id: 1 publisher_id: 2 - tag_name: "draft-release" - lower_tag_name: "draft-release" - target: "master" - title: "draft-release" + tag_name: draft-release + original_author_id: 0 + lower_tag_name: draft-release + target: master + title: draft-release + num_commits: 0 + note: '' is_draft: true is_prerelease: false is_tag: false created_unix: 1619524806 -- id: 5 +- + id: 5 repo_id: 1 publisher_id: 2 - tag_name: "v1.0" - lower_tag_name: "v1.0" - target: "master" - title: "pre-release" - note: "some text for a pre release" - sha1: "65f1bf27bc3bf70f64657658635e66094edbcb4d" + tag_name: v1.0 + original_author_id: 0 + lower_tag_name: v1.0 + target: master + title: pre-release + sha1: 65f1bf27bc3bf70f64657658635e66094edbcb4d num_commits: 1 + note: 'some text for a pre release' is_draft: false is_prerelease: true is_tag: false created_unix: 946684800 -- id: 6 +- + id: 6 repo_id: 57 publisher_id: 2 - tag_name: "v1.0" - lower_tag_name: "v1.0" - target: "main" - title: "v1.0" - sha1: "a8a700e8c644c783ba2c6e742bb81bf91e244bff" + tag_name: v1.0 + original_author_id: 0 + lower_tag_name: v1.0 + target: main + title: v1.0 + sha1: a8a700e8c644c783ba2c6e742bb81bf91e244bff num_commits: 3 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684801 -- id: 7 +- + id: 7 repo_id: 57 publisher_id: 2 - tag_name: "v1.1" - lower_tag_name: "v1.1" - target: "main" - title: "v1.1" - sha1: "cef06e48f2642cd0dc9597b4bea09f4b3f74aad6" + tag_name: v1.1 + original_author_id: 0 + lower_tag_name: v1.1 + target: main + title: v1.1 + sha1: cef06e48f2642cd0dc9597b4bea09f4b3f74aad6 num_commits: 5 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684802 -- id: 8 +- + id: 8 repo_id: 57 publisher_id: 2 - tag_name: "v2.0" - lower_tag_name: "v2.0" - target: "main" - title: "v2.0" - sha1: "7197b56fdc75b453f47c9110938cb46a303579fd" + tag_name: v2.0 + original_author_id: 0 + lower_tag_name: v2.0 + target: main + title: v2.0 + sha1: 7197b56fdc75b453f47c9110938cb46a303579fd num_commits: 6 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684803 -- id: 9 +- + id: 9 repo_id: 57 publisher_id: 2 - tag_name: "non-existing-target-branch" - lower_tag_name: "non-existing-target-branch" - target: "non-existing" - title: "non-existing-target-branch" - sha1: "cef06e48f2642cd0dc9597b4bea09f4b3f74aad6" + tag_name: non-existing-target-branch + original_author_id: 0 + lower_tag_name: non-existing-target-branch + target: non-existing + title: non-existing-target-branch + sha1: cef06e48f2642cd0dc9597b4bea09f4b3f74aad6 num_commits: 5 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684803 -- id: 10 +- + id: 10 repo_id: 57 publisher_id: 2 - tag_name: "empty-target-branch" - lower_tag_name: "empty-target-branch" - target: "" - title: "empty-target-branch" - sha1: "cef06e48f2642cd0dc9597b4bea09f4b3f74aad6" + tag_name: empty-target-branch + original_author_id: 0 + lower_tag_name: empty-target-branch + title: empty-target-branch + sha1: cef06e48f2642cd0dc9597b4bea09f4b3f74aad6 num_commits: 5 + note: '' is_draft: false is_prerelease: false is_tag: false created_unix: 946684803 + diff --git a/models/fixtures/renamed_branch.yml b/models/fixtures/renamed_branch.yml index efa5130a2b9e9..5fc87123760f4 100644 --- a/models/fixtures/renamed_branch.yml +++ b/models/fixtures/renamed_branch.yml @@ -3,3 +3,5 @@ repo_id: 1 from: dev to: master + created_unix: 0 + diff --git a/models/fixtures/repo_indexer_status.yml b/models/fixtures/repo_indexer_status.yml index ca780a73aa0c1..1ff9b878521a8 100644 --- a/models/fixtures/repo_indexer_status.yml +++ b/models/fixtures/repo_indexer_status.yml @@ -1 +1,132 @@ -[] # empty +- + id: 462 + repo_id: 49 + commit_sha: aacbdfe9e1c4b47f60abe81849045fa4e96f1d75 + indexer_type: 1 + +- + id: 463 + repo_id: 48 + commit_sha: cdaca8cf1d36e1e4e508a940f6e157e239beccfa + indexer_type: 1 + +- + id: 464 + repo_id: 47 + commit_sha: cdaca8cf1d36e1e4e508a940f6e157e239beccfa + indexer_type: 1 + +- + id: 465 + repo_id: 46 + commit_sha: cdaca8cf1d36e1e4e508a940f6e157e239beccfa + indexer_type: 1 + +- + id: 466 + repo_id: 44 + commit_sha: 2a83b349fa234131fc5db6f2a0498d3f4d3d6038 + indexer_type: 1 + +- + id: 467 + repo_id: 42 + commit_sha: ef6b814b610d8e7717aa0f71fbe5842bcf814697 + indexer_type: 1 + +- + id: 468 + repo_id: 41 + commit_sha: 6e75c9f89da9a9b93f4f36e61ed092f7a1625ba0 + indexer_type: 1 + +- + id: 469 + repo_id: 40 + commit_sha: bf19fd4707acb403c4aca44f126ab69142ac59ce + indexer_type: 1 + +- + id: 470 + repo_id: 39 + commit_sha: b895782bd271fdd266dd06e5880ea4abdc3a0dc7 + indexer_type: 1 + +- + id: 471 + repo_id: 38 + commit_sha: 90e402c3937a4639725fcc59ca1f529e7dc8506f + indexer_type: 1 + +- + id: 472 + repo_id: 37 + commit_sha: 65f1bf27bc3bf70f64657658635e66094edbcb4d + indexer_type: 1 + +- + id: 473 + repo_id: 36 + commit_sha: 9800fe78cabf4fe774fcf376f97fa2a0ed06987b + indexer_type: 1 + +- + id: 474 + repo_id: 33 + commit_sha: 3aa73c3499bff049a352b4e265575373e964b89a + indexer_type: 1 + +- + id: 475 + repo_id: 31 + commit_sha: 808038d2f71b0ab020991439cffd24309c7bc530 + indexer_type: 1 + +- + id: 476 + repo_id: 16 + commit_sha: 69554a64c1e6030f051e5c3f94bfbd773cd6a324 + indexer_type: 1 + +- + id: 477 + repo_id: 11 + commit_sha: 65f1bf27bc3bf70f64657658635e66094edbcb4d + indexer_type: 1 + +- + id: 478 + repo_id: 10 + commit_sha: 65f1bf27bc3bf70f64657658635e66094edbcb4d + indexer_type: 1 + +- + id: 479 + repo_id: 4 + commit_sha: c7cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 + indexer_type: 1 + +- + id: 480 + repo_id: 3 + commit_sha: 2a47ca4b614a9f5a43abbd5ad851a54a616ffee6 + indexer_type: 1 + +- + id: 481 + repo_id: 2 + commit_sha: 1032bbf17fbc0d9c95bb5418dabe8f8c99278700 + indexer_type: 1 + +- + id: 482 + repo_id: 1 + commit_sha: 65f1bf27bc3bf70f64657658635e66094edbcb4d + indexer_type: 1 + +- + id: 490 + repo_id: 54 + commit_sha: 73cf03db6ece34e12bf91e8853dc58f678f2f82d + indexer_type: 1 + diff --git a/models/fixtures/repo_redirect.yml b/models/fixtures/repo_redirect.yml index 8850c8d780b70..8a01fbe18b2b4 100644 --- a/models/fixtures/repo_redirect.yml +++ b/models/fixtures/repo_redirect.yml @@ -3,3 +3,4 @@ owner_id: 2 lower_name: oldrepo1 redirect_repo_id: 1 + diff --git a/models/fixtures/repo_topic.yml b/models/fixtures/repo_topic.yml index f166faccc1d8f..697925bc05445 100644 --- a/models/fixtures/repo_topic.yml +++ b/models/fixtures/repo_topic.yml @@ -25,3 +25,4 @@ - repo_id: 2 topic_id: 6 + diff --git a/models/fixtures/repo_transfer.yml b/models/fixtures/repo_transfer.yml index b841b5e983a1b..32340a6a948b3 100644 --- a/models/fixtures/repo_transfer.yml +++ b/models/fixtures/repo_transfer.yml @@ -5,3 +5,4 @@ repo_id: 3 created_unix: 1553610671 updated_unix: 1553610671 + diff --git a/models/fixtures/repo_unit.yml b/models/fixtures/repo_unit.yml index c22eb8c2a2f08..947adf57e03df 100644 --- a/models/fixtures/repo_unit.yml +++ b/models/fixtures/repo_unit.yml @@ -1,651 +1,679 @@ -# See models/unit/unit.go for the meaning of the type - id: 1 repo_id: 1 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 2 repo_id: 1 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 3 repo_id: 1 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 4 repo_id: 1 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 5 repo_id: 1 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 6 repo_id: 3 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 7 repo_id: 3 type: 2 - config: "{\"EnableTimetracker\":false,\"AllowOnlyContributorsToTrackTime\":false}" + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 - id: 8 repo_id: 3 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":true,\"AllowMerge\":true,\"AllowRebase\":false,\"AllowRebaseMerge\":true,\"AllowSquash\":false}" + config: '{"IgnoreWhitespaceConflicts":true,"AllowMerge":true,"AllowRebase":false,"AllowRebaseMerge":true,"AllowSquash":false,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 9 repo_id: 3 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 10 repo_id: 3 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 11 repo_id: 31 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 12 repo_id: 33 type: 1 - config: "{}" + config: '{}' created_unix: 1535593231 - id: 13 repo_id: 33 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 1535593231 - id: 14 repo_id: 33 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":false,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 1535593231 - id: 15 repo_id: 33 type: 4 - config: "{}" + config: '{}' created_unix: 1535593231 - id: 16 repo_id: 33 type: 5 - config: "{}" + config: '{}' created_unix: 1535593231 - id: 17 repo_id: 4 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 18 repo_id: 4 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 19 repo_id: 4 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 20 repo_id: 4 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 21 repo_id: 4 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":false,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 22 repo_id: 2 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 23 repo_id: 2 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 24 repo_id: 2 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 25 repo_id: 32 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 26 repo_id: 32 type: 2 - config: "{}" + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 1524304355 - id: 27 repo_id: 24 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 28 repo_id: 24 type: 2 - config: "{}" + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 1524304355 - id: 29 repo_id: 16 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 30 repo_id: 23 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 31 repo_id: 27 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 32 repo_id: 28 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 33 repo_id: 36 type: 4 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 34 repo_id: 36 type: 5 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 35 repo_id: 36 type: 1 - config: "{}" + config: '{}' created_unix: 1524304355 - id: 36 repo_id: 36 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 1524304355 - id: 37 repo_id: 36 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 1524304355 - id: 38 repo_id: 37 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 39 repo_id: 37 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 40 repo_id: 37 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 41 repo_id: 37 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 42 repo_id: 37 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 43 repo_id: 38 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 44 repo_id: 38 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 45 repo_id: 38 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 46 repo_id: 39 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 47 repo_id: 39 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 48 repo_id: 39 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 49 repo_id: 40 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 50 repo_id: 40 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 51 repo_id: 40 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 52 repo_id: 41 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 53 repo_id: 41 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 54 repo_id: 41 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 55 repo_id: 10 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 56 repo_id: 10 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 57 repo_id: 10 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 58 repo_id: 11 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 59 repo_id: 42 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 60 repo_id: 42 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 61 repo_id: 42 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 62 repo_id: 42 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 63 repo_id: 42 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 64 repo_id: 44 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 65 repo_id: 45 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 66 repo_id: 46 type: 7 - config: "{\"ExternalTrackerURL\":\"https://tracker.com\",\"ExternalTrackerFormat\":\"https://tracker.com/{user}/{repo}/issues/{index}\",\"ExternalTrackerStyle\":\"\"}" + config: '{"ExternalTrackerURL":"https://tracker.com","ExternalTrackerFormat":"https://tracker.com/{user}/{repo}/issues/{index}","ExternalTrackerStyle":"","ExternalTrackerRegexpPattern":""}' created_unix: 946684810 - id: 67 repo_id: 47 type: 7 - config: "{\"ExternalTrackerURL\":\"https://tracker.com\",\"ExternalTrackerFormat\":\"https://tracker.com/{user}/{repo}/issues/{index}\",\"ExternalTrackerStyle\":\"numeric\"}" + config: '{"ExternalTrackerURL":"https://tracker.com","ExternalTrackerFormat":"https://tracker.com/{user}/{repo}/issues/{index}","ExternalTrackerStyle":"numeric","ExternalTrackerRegexpPattern":""}' created_unix: 946684810 - id: 68 repo_id: 48 type: 7 - config: "{\"ExternalTrackerURL\":\"https://tracker.com\",\"ExternalTrackerFormat\":\"https://tracker.com/{user}/{repo}/issues/{index}\",\"ExternalTrackerStyle\":\"alphanumeric\"}" + config: '{"ExternalTrackerURL":"https://tracker.com","ExternalTrackerFormat":"https://tracker.com/{user}/{repo}/issues/{index}","ExternalTrackerStyle":"alphanumeric","ExternalTrackerRegexpPattern":""}' created_unix: 946684810 + - id: 69 repo_id: 2 type: 2 - config: "{}" + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 - id: 70 repo_id: 5 type: 4 - config: "{}" + config: '{}' created_unix: 946684810 - id: 71 repo_id: 5 type: 5 - config: "{}" + config: '{}' created_unix: 946684810 - id: 72 repo_id: 5 type: 1 - config: "{}" + config: '{}' created_unix: 946684810 - id: 73 repo_id: 5 type: 2 - config: "{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true}" + config: '{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":false}' created_unix: 946684810 - id: 74 repo_id: 5 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 75 repo_id: 1 type: 8 + config: '{}' created_unix: 946684810 - id: 76 repo_id: 2 type: 8 + config: '{}' created_unix: 946684810 - id: 77 repo_id: 3 type: 8 + config: '{}' created_unix: 946684810 - id: 78 repo_id: 50 type: 2 + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 - id: 79 repo_id: 51 type: 2 + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 - id: 80 repo_id: 53 type: 1 + config: '{}' created_unix: 946684810 - id: 81 repo_id: 54 type: 1 + config: '{}' created_unix: 946684810 - id: 82 repo_id: 31 type: 1 + config: '{}' created_unix: 946684810 - id: 83 repo_id: 31 type: 3 - config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":true,"AllowRebase":true,"AllowRebaseMerge":true,"AllowSquash":true,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":true,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 84 repo_id: 56 type: 1 + config: '{}' created_unix: 946684810 + - id: 85 repo_id: 57 type: 1 + config: '{}' created_unix: 946684810 + - id: 86 repo_id: 57 type: 2 + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 + - id: 87 repo_id: 57 type: 3 + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":false,"AllowRebase":false,"AllowRebaseMerge":false,"AllowSquash":false,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":false,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 + - id: 88 repo_id: 57 type: 4 + config: '{}' created_unix: 946684810 + - id: 89 repo_id: 57 type: 5 + config: '{}' created_unix: 946684810 - id: 90 repo_id: 52 type: 1 + config: '{}' created_unix: 946684810 - id: 91 repo_id: 58 type: 1 + config: '{}' created_unix: 946684810 - id: 92 repo_id: 58 type: 2 + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 - id: 93 repo_id: 58 type: 3 + config: '{"IgnoreWhitespaceConflicts":false,"AllowMerge":false,"AllowRebase":false,"AllowRebaseMerge":false,"AllowSquash":false,"AllowManualMerge":false,"AutodetectManualMerge":false,"AllowRebaseUpdate":false,"DefaultDeleteBranchAfterMerge":false,"DefaultMergeStyle":"","DefaultAllowMaintainerEdit":false}' created_unix: 946684810 - id: 94 repo_id: 58 type: 4 + config: '{}' created_unix: 946684810 - id: 95 repo_id: 58 type: 5 + config: '{}' created_unix: 946684810 - id: 96 repo_id: 49 type: 1 + config: '{}' created_unix: 946684810 - id: 97 repo_id: 49 type: 2 + config: '{"EnableTimetracker":false,"AllowOnlyContributorsToTrackTime":false,"EnableDependencies":false}' created_unix: 946684810 + diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index c63b7ebd48170..d6cbf24d59fab 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -1,10 +1,11 @@ -# don't forget to add fixtures in repo_unit.yml - id: 1 owner_id: 2 owner_name: user2 lower_name: repo1 name: repo1 + description: '' + original_service_type: 0 default_branch: master num_watches: 4 num_stars: 0 @@ -17,6 +18,8 @@ num_closed_milestones: 1 num_projects: 1 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -27,8 +30,14 @@ is_template: false template_id: 0 size: 7320 + git_size: 7320 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 2 @@ -36,6 +45,8 @@ owner_name: user2 lower_name: repo2 name: repo2 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 1 @@ -48,6 +59,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -57,9 +70,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 7576 + git_size: 7576 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: true + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 3 @@ -67,6 +86,8 @@ owner_name: org3 lower_name: repo3 name: repo3 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -79,6 +100,8 @@ num_closed_milestones: 0 num_projects: 1 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -88,9 +111,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 3288 + git_size: 3288 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 4 @@ -98,6 +127,8 @@ owner_name: user5 lower_name: repo4 name: repo4 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 1 @@ -110,6 +141,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 1 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -119,9 +152,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2164 + git_size: 2164 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 5 @@ -129,6 +168,8 @@ owner_name: org3 lower_name: repo5 name: repo5 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -140,6 +181,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -149,9 +192,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 3288 + git_size: 3288 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 6 @@ -159,6 +208,8 @@ owner_name: user10 lower_name: repo6 name: repo6 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -170,6 +221,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -180,8 +233,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 7 @@ -189,6 +248,8 @@ owner_name: user10 lower_name: repo7 name: repo7 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -200,6 +261,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -210,8 +273,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 8 @@ -219,6 +288,8 @@ owner_name: user10 lower_name: repo8 name: repo8 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -230,6 +301,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -240,8 +313,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 9 @@ -249,6 +328,8 @@ owner_name: user11 lower_name: repo9 name: repo9 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -260,6 +341,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -270,8 +353,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 10 @@ -279,6 +368,8 @@ owner_name: user12 lower_name: repo10 name: repo10 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -291,6 +382,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -300,9 +393,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 1738 + git_size: 1738 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 11 @@ -310,6 +409,8 @@ owner_name: user13 lower_name: repo11 name: repo11 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -322,6 +423,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -331,9 +434,15 @@ fork_id: 10 is_template: false template_id: 0 - size: 0 + size: 2695 + git_size: 2695 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 12 @@ -341,6 +450,8 @@ owner_name: user14 lower_name: test_repo_12 name: test_repo_12 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -352,6 +463,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -362,8 +475,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 13 @@ -371,6 +490,8 @@ owner_name: user14 lower_name: test_repo_13 name: test_repo_13 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -382,6 +503,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -392,8 +515,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 14 @@ -401,7 +530,8 @@ owner_name: user14 lower_name: test_repo_14 name: test_repo_14 - description: test_description_14 + description: 'test_description_14' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -413,6 +543,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -423,8 +555,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 15 @@ -432,6 +570,8 @@ owner_name: user2 lower_name: repo15 name: repo15 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -444,6 +584,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -453,9 +595,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 1227 + git_size: 1227 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 16 @@ -463,6 +611,8 @@ owner_name: user2 lower_name: repo16 name: repo16 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -475,6 +625,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -484,9 +636,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 3573 + git_size: 3573 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 17 @@ -494,6 +652,8 @@ owner_name: user15 lower_name: big_test_public_1 name: big_test_public_1 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -505,6 +665,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -515,8 +677,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 18 @@ -524,6 +692,8 @@ owner_name: user15 lower_name: big_test_public_2 name: big_test_public_2 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -535,6 +705,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -545,8 +717,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 19 @@ -554,6 +732,8 @@ owner_name: user15 lower_name: big_test_private_1 name: big_test_private_1 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -565,6 +745,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -575,8 +757,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 20 @@ -584,6 +772,8 @@ owner_name: user15 lower_name: big_test_private_2 name: big_test_private_2 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -595,6 +785,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -605,8 +797,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 21 @@ -614,6 +812,8 @@ owner_name: user16 lower_name: big_test_public_3 name: big_test_public_3 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -625,6 +825,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -635,8 +837,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 22 @@ -644,6 +852,8 @@ owner_name: user16 lower_name: big_test_private_3 name: big_test_private_3 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -655,6 +865,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -665,8 +877,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 23 @@ -674,6 +892,8 @@ owner_name: org17 lower_name: big_test_public_4 name: big_test_public_4 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -685,6 +905,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -695,8 +917,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 24 @@ -704,6 +932,8 @@ owner_name: org17 lower_name: big_test_private_4 name: big_test_private_4 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -715,6 +945,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -725,8 +957,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 25 @@ -734,6 +972,8 @@ owner_name: user20 lower_name: big_test_public_mirror_5 name: big_test_public_mirror_5 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -745,6 +985,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -755,8 +997,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 26 @@ -764,6 +1012,8 @@ owner_name: user20 lower_name: big_test_private_mirror_5 name: big_test_private_mirror_5 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -775,6 +1025,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -785,8 +1037,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 27 @@ -794,6 +1052,8 @@ owner_name: org19 lower_name: big_test_public_mirror_6 name: big_test_public_mirror_6 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 1 @@ -805,6 +1065,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -815,8 +1077,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 28 @@ -824,6 +1092,8 @@ owner_name: org19 lower_name: big_test_private_mirror_6 name: big_test_private_mirror_6 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 1 @@ -835,6 +1105,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -845,8 +1117,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 29 @@ -854,6 +1132,8 @@ owner_name: user20 lower_name: big_test_public_fork_7 name: big_test_public_fork_7 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -865,6 +1145,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -875,8 +1157,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 30 @@ -884,6 +1172,8 @@ owner_name: user20 lower_name: big_test_private_fork_7 name: big_test_private_fork_7 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -895,6 +1185,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -905,8 +1197,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 31 @@ -914,6 +1212,8 @@ owner_name: user2 lower_name: repo20 name: repo20 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -926,6 +1226,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -935,16 +1237,24 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 3368 + git_size: 3368 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - - id: 32 # org public repo + id: 32 owner_id: 3 owner_name: org3 lower_name: repo21 name: repo21 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -956,6 +1266,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -966,8 +1278,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 33 @@ -975,6 +1293,8 @@ owner_name: user2 lower_name: utf8 name: utf8 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -987,6 +1307,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -996,9 +1318,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 4936 + git_size: 4936 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 34 @@ -1006,6 +1334,8 @@ owner_name: user21 lower_name: golang name: golang + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -1017,6 +1347,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -1027,8 +1359,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 35 @@ -1036,6 +1374,8 @@ owner_name: user21 lower_name: graphql name: graphql + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -1047,6 +1387,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -1057,8 +1399,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 36 @@ -1066,6 +1414,8 @@ owner_name: user2 lower_name: commits_search_test name: commits_search_test + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1078,6 +1428,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1087,9 +1439,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2682 + git_size: 2682 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 37 @@ -1097,6 +1455,8 @@ owner_name: user2 lower_name: git_hooks_test name: git_hooks_test + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1109,6 +1469,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1118,9 +1480,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 1770 + git_size: 1770 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 38 @@ -1128,6 +1496,8 @@ owner_name: limited_org lower_name: public_repo_on_limited_org name: public_repo_on_limited_org + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1140,6 +1510,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1149,9 +1521,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2193 + git_size: 2193 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 39 @@ -1159,6 +1537,8 @@ owner_name: limited_org lower_name: private_repo_on_limited_org name: private_repo_on_limited_org + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1171,6 +1551,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -1180,9 +1562,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2192 + git_size: 2192 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 40 @@ -1190,6 +1578,8 @@ owner_name: privated_org lower_name: public_repo_on_private_org name: public_repo_on_private_org + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1202,6 +1592,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1211,9 +1603,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2194 + git_size: 2194 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 41 @@ -1221,6 +1619,8 @@ owner_name: privated_org lower_name: private_repo_on_private_org name: private_repo_on_private_org + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1233,6 +1633,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: false is_archived: false @@ -1242,9 +1644,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2195 + git_size: 2195 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 42 @@ -1252,6 +1660,8 @@ owner_name: user2 lower_name: glob name: glob + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1264,6 +1674,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1273,9 +1685,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 1861 + git_size: 1861 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 43 @@ -1283,6 +1701,8 @@ owner_name: org26 lower_name: repo26 name: repo26 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -1294,6 +1714,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -1304,8 +1726,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 44 @@ -1313,6 +1741,8 @@ owner_name: user27 lower_name: template1 name: template1 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1325,6 +1755,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1334,9 +1766,15 @@ fork_id: 0 is_template: true template_id: 0 - size: 0 + size: 2596 + git_size: 2596 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 45 @@ -1344,6 +1782,8 @@ owner_name: user27 lower_name: template2 name: template2 + description: '' + original_service_type: 0 num_watches: 0 num_stars: 0 num_forks: 0 @@ -1355,6 +1795,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: true is_archived: false @@ -1365,8 +1807,14 @@ is_template: true template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 46 @@ -1374,6 +1822,8 @@ owner_name: org26 lower_name: repo_external_tracker name: repo_external_tracker + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1386,6 +1836,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1395,9 +1847,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2620 + git_size: 2620 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 47 @@ -1405,6 +1863,8 @@ owner_name: org26 lower_name: repo_external_tracker_numeric name: repo_external_tracker_numeric + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1417,6 +1877,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1426,9 +1888,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2620 + git_size: 2620 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 48 @@ -1436,6 +1904,8 @@ owner_name: org26 lower_name: repo_external_tracker_alpha name: repo_external_tracker_alpha + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1448,6 +1918,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1457,9 +1929,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2620 + git_size: 2620 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 49 @@ -1467,6 +1945,8 @@ owner_name: user27 lower_name: repo49 name: repo49 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1479,6 +1959,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1488,9 +1970,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 1930 + git_size: 1930 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 50 @@ -1498,6 +1986,8 @@ owner_name: user30 lower_name: repo50 name: repo50 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1510,6 +2000,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1520,8 +2012,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 51 @@ -1529,6 +2027,8 @@ owner_name: user30 lower_name: repo51 name: repo51 + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1541,6 +2041,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: true @@ -1551,8 +2053,14 @@ is_template: false template_id: 0 size: 0 + git_size: 0 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 52 @@ -1560,6 +2068,8 @@ owner_name: user30 lower_name: empty name: empty + description: '' + original_service_type: 0 default_branch: master num_watches: 0 num_stars: 0 @@ -1572,6 +2082,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: true is_empty: true is_archived: false @@ -1581,9 +2093,15 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 125 + git_size: 125 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 53 @@ -1591,27 +2109,40 @@ owner_name: user30 lower_name: renderer name: renderer + description: '' + original_service_type: 0 default_branch: master - is_archived: false - is_empty: false - is_private: false + num_watches: 0 + num_stars: 0 + num_forks: 0 num_issues: 0 num_closed_issues: 0 num_pulls: 0 num_closed_pulls: 0 num_milestones: 0 num_closed_milestones: 0 - num_watches: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 + is_private: false + is_empty: false + is_archived: false + is_mirror: false status: 0 is_fork: false fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 2286 + git_size: 2286 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 54 @@ -1619,11 +2150,40 @@ owner_name: user2 lower_name: lfs name: lfs + description: '' + original_service_type: 0 default_branch: master + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 + is_private: true is_empty: false is_archived: false - is_private: true + is_mirror: false status: 0 + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 2331 + git_size: 2065 + lfs_size: 266 + is_fsck_enabled: true + close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 55 @@ -1631,11 +2191,39 @@ owner_name: user2 lower_name: scoped_label name: scoped_label + description: '' + original_service_type: 0 + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 1 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 + is_private: true is_empty: false is_archived: false - is_private: true - num_issues: 1 + is_mirror: false status: 0 + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 0 + git_size: 0 + lfs_size: 0 + is_fsck_enabled: true + close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 56 @@ -1643,12 +2231,40 @@ owner_name: user2 lower_name: readme-test name: readme-test + description: '' + original_service_type: 0 default_branch: master + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 + is_private: true is_empty: false is_archived: false - is_private: true + is_mirror: false status: 0 - num_issues: 0 + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 24149 + git_size: 24149 + lfs_size: 0 + is_fsck_enabled: true + close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - id: 57 @@ -1656,19 +2272,49 @@ owner_name: user2 lower_name: repo-release name: repo-release + description: '' + original_service_type: 0 default_branch: main + num_watches: 0 + num_stars: 0 + num_forks: 0 + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_milestones: 0 + num_closed_milestones: 0 + num_projects: 0 + num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 + is_private: false is_empty: false is_archived: false - is_private: false + is_mirror: false status: 0 - num_issues: 0 + is_fork: false + fork_id: 0 + is_template: false + template_id: 0 + size: 3480 + git_size: 3480 + lfs_size: 0 + is_fsck_enabled: true + close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 - - id: 58 # org public repo + id: 58 owner_id: 2 owner_name: user2 lower_name: commitsonpr name: commitsonpr + description: '' + original_service_type: 0 default_branch: main num_watches: 0 num_stars: 0 @@ -1681,6 +2327,8 @@ num_closed_milestones: 0 num_projects: 0 num_closed_projects: 0 + num_action_runs: 0 + num_closed_action_runs: 0 is_private: false is_empty: false is_archived: false @@ -1690,6 +2338,13 @@ fork_id: 0 is_template: false template_id: 0 - size: 0 + size: 6169 + git_size: 6169 + lfs_size: 0 is_fsck_enabled: true close_issues_via_commit_in_any_branch: false + trust_model: 0 + created_unix: 0 + updated_unix: 0 + archived_unix: 0 + diff --git a/models/fixtures/review.yml b/models/fixtures/review.yml index dda13dc468e47..49a54667a2121 100644 --- a/models/fixtures/review.yml +++ b/models/fixtures/review.yml @@ -2,133 +2,210 @@ id: 1 type: 1 reviewer_id: 1 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 2 - content: "Demo Review" - updated_unix: 946684810 + content: 'Demo Review' + official: false + stale: false + dismissed: false created_unix: 946684810 + updated_unix: 946684810 + - id: 2 type: 1 reviewer_id: 534543 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 534543 - content: "Invalid Review #1" - updated_unix: 946684810 + content: 'Invalid Review #1' + official: false + stale: false + dismissed: false created_unix: 946684810 + updated_unix: 946684810 + - id: 3 type: 1 reviewer_id: 1 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 343545 - content: "Invalid Review #2" - updated_unix: 946684810 + content: 'Invalid Review #2' + official: false + stale: false + dismissed: false created_unix: 946684810 + updated_unix: 946684810 + - id: 4 - type: 0 # Pending review + type: 0 reviewer_id: 1 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 2 - content: "Pending Review" - updated_unix: 946684810 + content: 'Pending Review' + official: false + stale: false + dismissed: false created_unix: 946684810 + updated_unix: 946684810 + - id: 5 type: 2 reviewer_id: 1 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 3 - content: "New review 1" - updated_unix: 946684810 + content: 'New review 1' + official: false + stale: false + dismissed: false created_unix: 946684810 + updated_unix: 946684810 + - id: 6 type: 0 reviewer_id: 2 - issue_id: 3 - content: "New review 3" + reviewer_team_id: 0 original_author_id: 0 - updated_unix: 946684811 + issue_id: 3 + content: 'New review 3' + official: false + stale: false + dismissed: false created_unix: 946684811 + updated_unix: 946684811 + - id: 7 type: 3 reviewer_id: 3 - issue_id: 3 - content: "New review 4" + reviewer_team_id: 0 original_author_id: 0 - updated_unix: 946684812 + issue_id: 3 + content: 'New review 4' + official: false + stale: false + dismissed: false created_unix: 946684812 + updated_unix: 946684812 + - id: 8 type: 1 reviewer_id: 4 - issue_id: 3 + reviewer_team_id: 0 original_author_id: 0 - content: "New review 5" + issue_id: 3 + content: 'New review 5' + official: false commit_id: 8091a55037cd59e47293aca02981b5a67076b364 stale: true - updated_unix: 946684813 + dismissed: false created_unix: 946684813 + updated_unix: 946684813 + - id: 9 type: 3 reviewer_id: 2 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 3 - content: "New review 3 rejected" - updated_unix: 946684814 + content: 'New review 3 rejected' + official: false + stale: false + dismissed: false created_unix: 946684814 - original_author_id: 0 + updated_unix: 946684814 - id: 10 type: 3 reviewer_id: 100 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 3 - content: "a deleted user's review" + content: 'a deleted user''s review' official: true - updated_unix: 946684815 + stale: false + dismissed: false created_unix: 946684815 + updated_unix: 946684815 - id: 11 type: 4 reviewer_id: 0 reviewer_team_id: 7 + original_author_id: 0 issue_id: 12 + content: '' official: true - updated_unix: 1602936509 + stale: false + dismissed: false created_unix: 1602936509 + updated_unix: 1602936509 - id: 12 type: 4 reviewer_id: 1 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 12 + content: '' official: true - updated_unix: 1603196749 + stale: false + dismissed: false created_unix: 1603196749 + updated_unix: 1603196749 - id: 13 type: 1 reviewer_id: 5 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 11 - content: "old review from user5" - updated_unix: 946684820 + content: 'old review from user5' + official: false + stale: false + dismissed: false created_unix: 946684820 + updated_unix: 946684820 - id: 14 type: 1 reviewer_id: 5 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 11 - content: "duplicate review from user5 (latest)" - updated_unix: 946684830 + content: 'duplicate review from user5 (latest)' + official: false + stale: false + dismissed: false created_unix: 946684830 + updated_unix: 946684830 - id: 15 type: 1 reviewer_id: 6 + reviewer_team_id: 0 + original_author_id: 0 issue_id: 11 - content: "singular review from org6 and final review for this pr" - updated_unix: 946684831 + content: 'singular review from org6 and final review for this pr' + official: false + stale: false + dismissed: false created_unix: 946684831 + updated_unix: 946684831 + diff --git a/models/fixtures/star.yml b/models/fixtures/star.yml index 860f26b8e2282..427c6562b8b8d 100644 --- a/models/fixtures/star.yml +++ b/models/fixtures/star.yml @@ -2,8 +2,11 @@ id: 1 uid: 2 repo_id: 2 + created_unix: 0 - id: 2 uid: 2 repo_id: 4 + created_unix: 0 + diff --git a/models/fixtures/stopwatch.yml b/models/fixtures/stopwatch.yml index b7919d6fbbd6e..8d03dbc2b4a26 100644 --- a/models/fixtures/stopwatch.yml +++ b/models/fixtures/stopwatch.yml @@ -1,11 +1,12 @@ - id: 1 - user_id: 1 issue_id: 1 + user_id: 1 created_unix: 1500988001 - id: 2 - user_id: 2 issue_id: 2 + user_id: 2 created_unix: 1500988002 + diff --git a/models/fixtures/system_setting.yml b/models/fixtures/system_setting.yml index 30542bc82a92c..01dbc5fcac55c 100644 --- a/models/fixtures/system_setting.yml +++ b/models/fixtures/system_setting.yml @@ -1,6 +1,6 @@ - id: 1 - setting_key: 'picture.disable_gravatar' + setting_key: picture.disable_gravatar setting_value: 'false' version: 1 created: 1653533198 @@ -8,8 +8,9 @@ - id: 2 - setting_key: 'picture.enable_federated_avatar' + setting_key: picture.enable_federated_avatar setting_value: 'false' version: 1 created: 1653533198 updated: 1653533198 + diff --git a/models/fixtures/team.yml b/models/fixtures/team.yml index 65326eedbf476..2614b70b7a46f 100644 --- a/models/fixtures/team.yml +++ b/models/fixtures/team.yml @@ -3,7 +3,7 @@ org_id: 3 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 3 num_members: 1 includes_all_repositories: false @@ -14,7 +14,7 @@ org_id: 3 lower_name: team1 name: team1 - authorize: 2 # write + 'authorize': 2 num_repos: 1 num_members: 2 includes_all_repositories: false @@ -25,7 +25,7 @@ org_id: 6 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -36,7 +36,7 @@ org_id: 7 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -47,7 +47,7 @@ org_id: 17 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 2 num_members: 2 includes_all_repositories: false @@ -58,7 +58,7 @@ org_id: 19 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 2 num_members: 2 includes_all_repositories: false @@ -69,7 +69,7 @@ org_id: 3 lower_name: test_team name: test_team - authorize: 2 # write + 'authorize': 2 num_repos: 1 num_members: 1 includes_all_repositories: false @@ -80,7 +80,7 @@ org_id: 17 lower_name: test_team name: test_team - authorize: 2 # write + 'authorize': 2 num_repos: 1 num_members: 1 includes_all_repositories: false @@ -91,7 +91,7 @@ org_id: 17 lower_name: review_team name: review_team - authorize: 1 # read + 'authorize': 1 num_repos: 1 num_members: 2 includes_all_repositories: false @@ -102,7 +102,7 @@ org_id: 25 lower_name: notowners name: NotOwners - authorize: 1 # read + 'authorize': 1 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -113,7 +113,7 @@ org_id: 26 lower_name: team11 name: team11 - authorize: 1 # read + 'authorize': 1 num_repos: 0 num_members: 0 includes_all_repositories: false @@ -124,7 +124,7 @@ org_id: 3 lower_name: team12creators name: team12Creators - authorize: 3 # admin + 'authorize': 3 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -135,7 +135,7 @@ org_id: 6 lower_name: team13notcreators name: team13NotCreators - authorize: 3 # admin + 'authorize': 3 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -146,7 +146,7 @@ org_id: 3 lower_name: teamcreaterepo name: teamCreateRepo - authorize: 2 # write + 'authorize': 2 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -157,7 +157,7 @@ org_id: 22 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 0 includes_all_repositories: false @@ -168,7 +168,7 @@ org_id: 23 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 0 includes_all_repositories: false @@ -179,7 +179,7 @@ org_id: 23 lower_name: team14writeauth name: team14WriteAuth - authorize: 2 # write + 'authorize': 2 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -190,7 +190,7 @@ org_id: 35 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -201,7 +201,7 @@ org_id: 36 lower_name: owners name: Owners - authorize: 4 # owner + 'authorize': 4 num_repos: 0 num_members: 1 includes_all_repositories: false @@ -212,8 +212,9 @@ org_id: 36 lower_name: team20writepackage name: team20writepackage - authorize: 1 + 'authorize': 1 num_repos: 0 num_members: 1 includes_all_repositories: false can_create_org_repo: true + diff --git a/models/fixtures/team_repo.yml b/models/fixtures/team_repo.yml index a523a90b204d2..192118339c3f0 100644 --- a/models/fixtures/team_repo.yml +++ b/models/fixtures/team_repo.yml @@ -62,4 +62,5 @@ id: 11 org_id: 17 team_id: 9 - repo_id: 24 \ No newline at end of file + repo_id: 24 + diff --git a/models/fixtures/team_unit.yml b/models/fixtures/team_unit.yml index c5531aa57af52..ac3487466c1d4 100644 --- a/models/fixtures/team_unit.yml +++ b/models/fixtures/team_unit.yml @@ -1,251 +1,293 @@ - id: 1 + org_id: 0 team_id: 1 type: 1 access_mode: 4 - id: 2 + org_id: 0 team_id: 1 type: 2 access_mode: 4 - id: 3 + org_id: 0 team_id: 1 type: 3 access_mode: 4 - id: 4 + org_id: 0 team_id: 1 type: 4 access_mode: 4 - id: 5 + org_id: 0 team_id: 1 type: 5 access_mode: 4 - id: 6 + org_id: 0 team_id: 1 type: 6 access_mode: 4 - id: 7 + org_id: 0 team_id: 1 type: 7 access_mode: 4 - id: 8 + org_id: 0 team_id: 2 type: 1 access_mode: 2 - id: 9 + org_id: 0 team_id: 2 type: 2 access_mode: 2 - id: 10 + org_id: 0 team_id: 2 type: 3 access_mode: 2 - id: 11 + org_id: 0 team_id: 2 type: 4 access_mode: 2 - id: 12 + org_id: 0 team_id: 2 type: 5 access_mode: 2 - id: 13 + org_id: 0 team_id: 2 type: 6 access_mode: 2 - id: 14 + org_id: 0 team_id: 2 type: 7 access_mode: 2 - id: 15 + org_id: 0 team_id: 3 type: 1 access_mode: 4 - id: 16 + org_id: 0 team_id: 3 type: 2 access_mode: 4 - id: 17 + org_id: 0 team_id: 3 type: 3 access_mode: 4 - id: 18 + org_id: 0 team_id: 3 type: 4 access_mode: 4 - id: 19 + org_id: 0 team_id: 3 type: 5 access_mode: 4 - id: 20 + org_id: 0 team_id: 3 type: 6 access_mode: 4 - id: 21 + org_id: 0 team_id: 3 type: 7 access_mode: 4 - id: 22 + org_id: 0 team_id: 4 type: 1 access_mode: 4 - id: 23 + org_id: 0 team_id: 4 type: 2 access_mode: 4 - id: 24 + org_id: 0 team_id: 4 type: 3 access_mode: 4 - id: 25 + org_id: 0 team_id: 4 type: 4 access_mode: 4 - id: 26 + org_id: 0 team_id: 4 type: 5 access_mode: 4 - id: 27 + org_id: 0 team_id: 4 type: 6 access_mode: 4 - id: 28 + org_id: 0 team_id: 4 type: 7 access_mode: 4 - id: 29 + org_id: 0 team_id: 5 type: 1 access_mode: 4 - id: 30 + org_id: 0 team_id: 5 type: 2 access_mode: 4 - id: 31 + org_id: 0 team_id: 5 type: 3 access_mode: 4 - id: 32 + org_id: 0 team_id: 5 type: 4 access_mode: 4 - id: 33 + org_id: 0 team_id: 5 type: 5 access_mode: 4 - id: 34 + org_id: 0 team_id: 5 type: 6 access_mode: 4 - id: 35 + org_id: 0 team_id: 5 type: 7 access_mode: 4 - id: 36 + org_id: 0 team_id: 6 type: 1 access_mode: 4 - id: 37 + org_id: 0 team_id: 6 type: 2 access_mode: 4 - id: 38 + org_id: 0 team_id: 6 type: 3 access_mode: 4 - id: 39 + org_id: 0 team_id: 6 type: 4 access_mode: 4 - id: 40 + org_id: 0 team_id: 6 type: 5 access_mode: 4 - id: 41 + org_id: 0 team_id: 6 type: 6 access_mode: 4 - id: 42 + org_id: 0 team_id: 6 type: 7 access_mode: 4 @@ -254,35 +296,41 @@ id: 43 org_id: 3 team_id: 7 - type: 2 # issues + type: 2 access_mode: 2 - id: 44 + org_id: 0 team_id: 8 - type: 2 # issues + type: 2 access_mode: 2 - id: 45 + org_id: 0 team_id: 9 - type: 1 # code + type: 1 access_mode: 1 - id: 46 + org_id: 0 team_id: 17 - type: 9 # package + type: 9 access_mode: 2 - id: 47 + org_id: 0 team_id: 20 - type: 9 # package + type: 9 access_mode: 2 - id: 48 + org_id: 0 team_id: 2 type: 8 access_mode: 2 + diff --git a/models/fixtures/team_user.yml b/models/fixtures/team_user.yml index feace5f2a531d..3eee38faba615 100644 --- a/models/fixtures/team_user.yml +++ b/models/fixtures/team_user.yml @@ -123,3 +123,4 @@ org_id: 36 team_id: 20 uid: 5 + diff --git a/models/fixtures/topic.yml b/models/fixtures/topic.yml index 055addf510e20..78c74ee8e5a7e 100644 --- a/models/fixtures/topic.yml +++ b/models/fixtures/topic.yml @@ -2,28 +2,41 @@ id: 1 name: golang repo_count: 2 + created_unix: 0 + updated_unix: 0 - id: 2 name: database repo_count: 1 + created_unix: 0 + updated_unix: 0 - id: 3 name: SQL repo_count: 1 + created_unix: 0 + updated_unix: 0 - id: 4 name: graphql repo_count: 1 + created_unix: 0 + updated_unix: 0 - id: 5 name: topicname1 repo_count: 1 + created_unix: 0 + updated_unix: 0 - id: 6 name: topicname2 repo_count: 2 + created_unix: 0 + updated_unix: 0 + diff --git a/models/fixtures/tracked_time.yml b/models/fixtures/tracked_time.yml index 768af38d9e20f..46d7d2ed30bd4 100644 --- a/models/fixtures/tracked_time.yml +++ b/models/fixtures/tracked_time.yml @@ -1,71 +1,72 @@ - id: 1 - user_id: 1 issue_id: 1 - time: 400 + user_id: 1 created_unix: 946684800 + time: 400 deleted: false - id: 2 - user_id: 2 issue_id: 2 - time: 3661 + user_id: 2 created_unix: 946684801 + time: 3661 deleted: false - id: 3 - user_id: 2 issue_id: 2 - time: 1 + user_id: 2 created_unix: 946684802 + time: 1 deleted: false - id: 4 - user_id: -1 issue_id: 4 - time: 1 + user_id: -1 created_unix: 946684803 + time: 1 deleted: false - id: 5 - user_id: 2 issue_id: 5 - time: 1 + user_id: 2 created_unix: 946684804 + time: 1 deleted: false - id: 6 - user_id: 1 issue_id: 2 - time: 20 + user_id: 1 created_unix: 946684812 + time: 20 deleted: false - id: 7 - user_id: 2 issue_id: 4 - time: 3 + user_id: 2 created_unix: 946684813 + time: 3 deleted: false - id: 8 - user_id: 1 issue_id: 4 - time: 71 + user_id: 1 created_unix: 947688814 + time: 71 deleted: false - id: 9 - user_id: 2 issue_id: 2 - time: 100000 + user_id: 2 created_unix: 947688815 + time: 100000 deleted: true + diff --git a/models/fixtures/two_factor.yml b/models/fixtures/two_factor.yml index d8cb85274b687..6afbc4bd0d972 100644 --- a/models/fixtures/two_factor.yml +++ b/models/fixtures/two_factor.yml @@ -4,6 +4,6 @@ secret: KlDporn6Ile4vFcKI8z7Z6sqK1Scj2Qp0ovtUzCZO6jVbRW2lAoT7UDxDPtrab8d2B9zKOocBRdBJnS8orsrUNrsyETY+jJHb79M82uZRioKbRUz15sfOpmJmEzkFeSg6S4LicUBQos= scratch_salt: Qb5bq2DyR2 scratch_hash: 068eb9b8746e0bcfe332fac4457693df1bda55800eb0f6894d14ebb736ae6a24e0fc8fc5333c19f57f81599788f0b8e51ec1 - last_used_passcode: created_unix: 1564253724 updated_unix: 1564253724 + diff --git a/models/fixtures/user.md b/models/fixtures/user.md new file mode 100644 index 0000000000000..2e5611c78cbb8 --- /dev/null +++ b/models/fixtures/user.md @@ -0,0 +1,3 @@ +- NOTE: all users should have a password of "password" + +- NOTE: this user (id=1) is the admin diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml index fd513798167d4..e0dfa3186cb08 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -1,6 +1,4 @@ -# NOTE: all users should have a password of "password" - -- # NOTE: this user (id=1) is the admin +- id: 1 lower_name: user1 name: user1 @@ -11,10 +9,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user1 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: true @@ -34,24 +37,29 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - id: 2 lower_name: user2 name: user2 - full_name: ' < Ur Tw >< ' + full_name: < Ur Tw >< email: user2@example.com keep_email_private: true email_notifications_preference: enabled passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user2 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -71,24 +79,29 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - id: 3 lower_name: org3 name: org3 - full_name: ' <<<< >> >> > >> > >>> >> ' + full_name: <<<< >> >> > >> > >>> >> email: org3@example.com keep_email_private: false email_notifications_preference: onmention passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org3 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -108,24 +121,28 @@ num_members: 3 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - id: 4 lower_name: user4 name: user4 - full_name: ' ' email: user4@example.com keep_email_private: false email_notifications_preference: onmention passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user4 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -145,7 +162,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -159,10 +176,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user5 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -182,7 +204,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -196,10 +218,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org6 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -219,7 +246,7 @@ num_members: 2 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -233,10 +260,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org7 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -256,7 +288,7 @@ num_members: 1 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -270,10 +302,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user8 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -293,7 +330,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -307,10 +344,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user9 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -330,7 +372,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -344,10 +386,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user10 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -367,7 +414,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -381,10 +428,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user11 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -404,7 +456,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -418,10 +470,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user12 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -441,7 +498,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -455,10 +512,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user13 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -478,7 +540,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -492,10 +554,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user14 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -515,7 +582,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -529,10 +596,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user15 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -552,7 +624,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -566,10 +638,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user16 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -589,7 +666,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -603,10 +680,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org17 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -626,7 +708,7 @@ num_members: 4 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -640,10 +722,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user18 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -663,7 +750,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -677,10 +764,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org19 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -700,7 +792,7 @@ num_members: 2 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -714,10 +806,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user20 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -737,7 +834,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -751,10 +848,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user21 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -774,7 +876,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -788,10 +890,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: limited_org type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -811,7 +918,7 @@ num_members: 0 visibility: 1 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -825,10 +932,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: privated_org type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -848,7 +960,7 @@ num_members: 1 visibility: 2 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -862,10 +974,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user24 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -885,7 +1002,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -899,10 +1016,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org25 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -922,7 +1044,7 @@ num_members: 1 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -936,10 +1058,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: org26 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: false is_admin: false @@ -959,7 +1086,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: true - theme: "" + theme: auto keep_activity_private: false - @@ -973,10 +1100,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user27 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -996,7 +1128,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1010,10 +1142,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user28 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1033,7 +1170,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1047,10 +1184,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user29 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1070,7 +1212,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1084,10 +1226,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user30 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1107,7 +1254,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1121,10 +1268,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user31 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1144,7 +1296,7 @@ num_members: 0 visibility: 2 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1158,10 +1310,15 @@ passwd: ZogKvWdyEx:notpassword passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user32 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1181,7 +1338,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1195,10 +1352,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: user33 type: 0 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1218,7 +1380,7 @@ num_members: 0 visibility: 1 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1226,17 +1388,22 @@ lower_name: the_34-user.with.all.allowedchars name: the_34-user.with.all.allowedChars full_name: the_1-user.with.all.allowedChars - description: 'some [commonmark](https://commonmark.org/)!' email: user34@example.com keep_email_private: false email_notifications_preference: enabled passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: the_34-user.with.all.allowedchars type: 0 salt: ZogKvWdyEx + description: some [commonmark](https://commonmark.org/)! + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1256,7 +1423,7 @@ num_members: 0 visibility: 0 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1270,10 +1437,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: private_org35 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1293,7 +1465,7 @@ num_members: 1 visibility: 2 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false - @@ -1307,10 +1479,15 @@ passwd: ZogKvWdyEx:password passwd_hash_algo: dummy must_change_password: false + login_type: 0 login_source: 0 login_name: limited_org36 type: 1 salt: ZogKvWdyEx + created_unix: 0 + updated_unix: 0 + last_login_unix: 0 + last_repo_visibility: false max_repo_creation: -1 is_active: true is_admin: false @@ -1330,5 +1507,6 @@ num_members: 2 visibility: 1 repo_admin_change_team_access: false - theme: "" + theme: auto keep_activity_private: false + diff --git a/models/fixtures/user_open_id.yml b/models/fixtures/user_open_id.yml index d3a367b99dfa3..68c05287a87b8 100644 --- a/models/fixtures/user_open_id.yml +++ b/models/fixtures/user_open_id.yml @@ -15,3 +15,4 @@ uid: 2 uri: https://domain1.tld/user2/ show: true + diff --git a/models/fixtures/user_redirect.yml b/models/fixtures/user_redirect.yml index 8ff79933983eb..3465b7b65651d 100644 --- a/models/fixtures/user_redirect.yml +++ b/models/fixtures/user_redirect.yml @@ -2,3 +2,4 @@ id: 1 lower_name: olduser1 redirect_user_id: 1 + diff --git a/models/fixtures/watch.yml b/models/fixtures/watch.yml index c29f6bb65a889..985abd0ab404d 100644 --- a/models/fixtures/watch.yml +++ b/models/fixtures/watch.yml @@ -2,28 +2,39 @@ id: 1 user_id: 1 repo_id: 1 - mode: 1 # normal + mode: 1 + created_unix: 0 + updated_unix: 0 - id: 2 user_id: 4 repo_id: 1 - mode: 1 # normal + mode: 1 + created_unix: 0 + updated_unix: 0 - id: 3 user_id: 9 repo_id: 1 - mode: 1 # normal + mode: 1 + created_unix: 0 + updated_unix: 0 - id: 4 user_id: 8 repo_id: 1 - mode: 2 # don't watch + mode: 2 + created_unix: 0 + updated_unix: 0 - id: 5 user_id: 11 repo_id: 1 - mode: 3 # auto + mode: 3 + created_unix: 0 + updated_unix: 0 + diff --git a/models/fixtures/webauthn_credential.yml b/models/fixtures/webauthn_credential.yml index bc43127fcd46d..faa2e1894e7e2 100644 --- a/models/fixtures/webauthn_credential.yml +++ b/models/fixtures/webauthn_credential.yml @@ -1,9 +1,11 @@ - id: 1 name: WebAuthn credential + lower_name: webauthn credential user_id: 32 attestation_type: none sign_count: 0 clone_warning: false created_unix: 946684800 updated_unix: 946684800 + diff --git a/models/fixtures/webhook.yml b/models/fixtures/webhook.yml index f62bae1f311ce..c84f9796332cb 100644 --- a/models/fixtures/webhook.yml +++ b/models/fixtures/webhook.yml @@ -1,31 +1,64 @@ - id: 1 repo_id: 1 - url: www.example.com/url1 - content_type: 1 # json + owner_id: 0 + is_system_webhook: false + url: 'www.example.com/url1' + content_type: 1 + secret: '' events: '{"push_only":true,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":false}}' is_active: true + meta: '' + last_status: 0 + header_authorization_encrypted: '' + created_unix: 0 + updated_unix: 0 - id: 2 repo_id: 1 - url: www.example.com/url2 - content_type: 1 # json + owner_id: 0 + is_system_webhook: false + url: 'www.example.com/url2' + content_type: 1 + secret: '' events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}' is_active: false + meta: '' + last_status: 0 + header_authorization_encrypted: '' + created_unix: 0 + updated_unix: 0 - id: 3 - owner_id: 3 repo_id: 3 - url: www.example.com/url3 - content_type: 1 # json + owner_id: 3 + is_system_webhook: false + url: 'www.example.com/url3' + content_type: 1 + secret: '' events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}' is_active: true + meta: '' + last_status: 0 + header_authorization_encrypted: '' + created_unix: 0 + updated_unix: 0 + - id: 4 repo_id: 2 - url: www.example.com/url4 - content_type: 1 # json + owner_id: 0 + is_system_webhook: false + url: 'www.example.com/url4' + content_type: 1 + secret: '' events: '{"push_only":true,"branch_filter":"{master,feature*}"}' is_active: true + meta: '' + last_status: 0 + header_authorization_encrypted: '' + created_unix: 0 + updated_unix: 0 + diff --git a/models/git/lfs.go b/models/git/lfs.go index e8192f92c5c68..dcf53836d8cef 100644 --- a/models/git/lfs.go +++ b/models/git/lfs.go @@ -117,6 +117,14 @@ type LFSMetaObject struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` } +func (task *LFSMetaObject) FixtureFieldDumper(fieldName string) ([]byte, error) { + if fieldName == "UpdatedUnix" { + return nil, db.ErrFixtureFieldDumperSkip + } + + return nil, db.ErrFixtureFieldDumperContinue +} + func init() { db.RegisterModel(new(LFSMetaObject)) } diff --git a/models/issues/pull.go b/models/issues/pull.go index 1c163ecca41de..4c2adde342e12 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -320,6 +320,10 @@ func (pr *PullRequest) LoadRequestedReviewers(ctx context.Context) error { return err } for _, review := range reviews { + if review.Type != ReviewTypeRequest { + continue + } + pr.RequestedReviewers = append(pr.RequestedReviewers, review.Reviewer) } diff --git a/models/issues/pull_test.go b/models/issues/pull_test.go index 1105608858f75..c0d2a73bcc776 100644 --- a/models/issues/pull_test.go +++ b/models/issues/pull_test.go @@ -89,6 +89,9 @@ func TestLoadRequestedReviewers(t *testing.T) { user1, err := user_model.GetUserByID(db.DefaultContext, 1) assert.NoError(t, err) + assert.NoError(t, pull.LoadRequestedReviewers(db.DefaultContext)) + assert.Len(t, pull.RequestedReviewers, 0) + comment, err := issues_model.AddReviewRequest(db.DefaultContext, issue, user1, &user_model.User{}) assert.NoError(t, err) assert.NotNil(t, comment) diff --git a/models/issues/review.go b/models/issues/review.go index 931f1a2ba72e4..8ff20a213aee1 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -159,6 +159,11 @@ func (r *Review) LoadReviewer(ctx context.Context) (err error) { return err } r.Reviewer, err = user_model.GetPossibleUserByID(ctx, r.ReviewerID) + if user_model.IsErrUserNotExist(err) { + r.Reviewer = user_model.NewGhostUser() + return nil + } + return err } diff --git a/models/issues/review_list.go b/models/issues/review_list.go index 9f50d8e09d552..11bb20db9cd15 100644 --- a/models/issues/review_list.go +++ b/models/issues/review_list.go @@ -33,6 +33,9 @@ func (reviews ReviewList) LoadReviewers(ctx context.Context) error { } for _, review := range reviews { review.Reviewer = userMap[review.ReviewerID] + if review.Reviewer == nil { + review.Reviewer = user_model.NewGhostUser() + } } return nil } diff --git a/models/issues/review_test.go b/models/issues/review_test.go index 8f0e773f4cd1e..5c1750d4e370d 100644 --- a/models/issues/review_test.go +++ b/models/issues/review_test.go @@ -142,6 +142,11 @@ func TestGetReviewersByIssueID(t *testing.T) { Reviewer: user2, Type: issues_model.ReviewTypeReject, UpdatedUnix: 946684814, + }, + &issues_model.Review{ + Reviewer: user_model.NewGhostUser(), + Type: issues_model.ReviewTypeReject, + UpdatedUnix: 946684815, }) allReviews, err := issues_model.GetReviewsByIssueID(issue.ID) @@ -149,7 +154,7 @@ func TestGetReviewersByIssueID(t *testing.T) { for _, review := range allReviews { assert.NoError(t, review.LoadReviewer(db.DefaultContext)) } - if assert.Len(t, allReviews, 3) { + if assert.Len(t, allReviews, 4) { for i, review := range allReviews { assert.Equal(t, expectedReviews[i].Reviewer, review.Reviewer) assert.Equal(t, expectedReviews[i].Type, review.Type) @@ -160,7 +165,7 @@ func TestGetReviewersByIssueID(t *testing.T) { allReviews, err = issues_model.GetReviewsByIssueID(issue.ID) assert.NoError(t, err) assert.NoError(t, allReviews.LoadReviewers(db.DefaultContext)) - if assert.Len(t, allReviews, 3) { + if assert.Len(t, allReviews, 4) { for i, review := range allReviews { assert.Equal(t, expectedReviews[i].Reviewer, review.Reviewer) assert.Equal(t, expectedReviews[i].Type, review.Type) diff --git a/models/unittest/fixtures.go b/models/unittest/fixtures.go index c653ce1e38a14..a9d64a0b129cf 100644 --- a/models/unittest/fixtures.go +++ b/models/unittest/fixtures.go @@ -5,16 +5,25 @@ package unittest import ( + "errors" "fmt" + "io" "os" + "path" + "reflect" + "strings" "time" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/auth/password/hash" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" "github.com/go-testfixtures/testfixtures/v3" "xorm.io/xorm" + "xorm.io/xorm/convert" + "xorm.io/xorm/names" "xorm.io/xorm/schemas" ) @@ -75,6 +84,30 @@ func InitFixtures(opts FixturesOptions, engine ...*xorm.Engine) (err error) { return err } +func DumpAllFixtures(dir string) error { + return db.AllTablesForEach(func(info *schemas.Table, bean any) error { + pth := path.Join(dir, info.Name+".yml") + fd, err := os.OpenFile(pth, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0o644) + if err != nil { + return err + } + defer fd.Close() + + sum, err := db.GetEngine(db.DefaultContext).Count(bean) + if err != nil { + return err + } + if sum == 0 { + _, err = fd.WriteString("[] # empty\n") + return err + } + + return db.GetEngine(db.DefaultContext).Iterate(bean, func(idx int, data interface{}) error { + return DefaultFixtureDumper(data, fd) + }) + }) +} + // LoadFixtures load fixtures for a test database func LoadFixtures(engine ...*xorm.Engine) error { e := GetXORMEngine(engine...) @@ -126,3 +159,399 @@ func LoadFixtures(engine ...*xorm.Engine) error { return err } + +func isFieldNil(field reflect.Value) bool { + if !field.IsValid() { + return true + } + + switch field.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan, reflect.Func: + return field.IsNil() + default: + return false + } +} + +func isFieldPrivate(field reflect.StructField) bool { + return field.PkgPath != "" +} + +func defaultFixtureDumperVerbs(tableName string, actualValue reflect.Value, typeOfactualValue reflect.Type, fd io.Writer, mapper names.Mapper, fieldDumper db.FixtureFieldDumper) error { + for i := 0; i < actualValue.NumField(); i++ { + field := actualValue.Field(i) + + fieldNameReal := actualValue.Type().Field(i).Name + fieldName := mapper.Obj2Table(fieldNameReal) + fieldType := typeOfactualValue.Field(i) + if isFieldPrivate(fieldType) { + continue + } + xormTags, err := splitXormTag(fieldType.Tag.Get("xorm")) + if err != nil { + return err + } + + if xormTags.HasTag("-") { + continue + } + + if fieldDumper != nil { + value, err := fieldDumper.FixtureFieldDumper(fieldNameReal) + if err == nil { + _, err = fd.Write([]byte(fmt.Sprintf(" %s: ", xormTags.GetFieldName(fieldName)))) + if err != nil { + return err + } + + _, err = fd.Write(value) + if err != nil { + return err + } + + _, err = fd.Write([]byte("\n")) + if err != nil { + return err + } + + continue + } + + if err == db.ErrFixtureFieldDumperSkip { + continue + } + + if err != db.ErrFixtureFieldDumperContinue { + return err + } + } + + fieldValue := field.Interface() + isText := xormTags.HasTag("TEXT") + isJSON := xormTags.HasTag("JSON") + conversion, hasconversion := fieldValue.(convert.Conversion) + if (!hasconversion) && isFieldNil(field) { + continue + } + + if isText { + if _, ok := fieldValue.([]string); ok { + isJSON = true + } + } + + if !isText { + if strValue, ok := fieldValue.(string); ok { + if len(strValue) == 0 { + continue + } + } + } + + if xormTags.HasTag("EXTENDS") { + var actualValue2 reflect.Value + + if field.Kind() == reflect.Ptr { + actualValue2 = field.Elem() + } else { + actualValue2 = field + } + + typeOfactualValue2 := actualValue2.Type() + err = defaultFixtureDumperVerbs(tableName, actualValue2, typeOfactualValue2, fd, mapper, fieldDumper) + if err != nil { + return err + } + + continue + } + + int64Type := reflect.TypeOf(int64(0)) + isInt64 := field.Type().ConvertibleTo(int64Type) + if fieldType.Type.Kind() == reflect.Struct && !isInt64 && !isText && !isJSON { + return fmt.Errorf("%s: '%s' is a struct which can't be convert to a table field", tableName, xormTags.GetFieldName(fieldName)) + } + + _, err = fd.Write([]byte(fmt.Sprintf(" %s: ", xormTags.GetFieldName(fieldName)))) + if err != nil { + return err + } + + if isJSON { + result, err := json.Marshal(fieldValue) + if err != nil { + return err + } + result2 := []byte{'\''} + result2 = append(result2, result...) + result2 = append(result2, []byte{'\'', '\n'}...) + + _, err = fd.Write(result2) + if err != nil { + return err + } + + continue + } + + var strValue []byte + if hasconversion { + strValue, err = conversion.ToDB() + if err != nil { + return err + } + } else if isInt64 { + intValue := field.Convert(int64Type).Int() + strValue = []byte(fmt.Sprintf("%d", intValue)) + } else if bytes, ok := fieldValue.([]byte); ok && !isJSON { + isText = false + strValue = []byte{'0', 'x'} + vStrBuilder := strings.Builder{} + + for _, b := range bytes { + fmt.Fprintf(&vStrBuilder, "%02x", b) + } + + strValue = append(strValue, []byte(vStrBuilder.String())...) + + } else { + strValue = []byte(fmt.Sprintf("%v", fieldValue)) + } + + isAllNumber := true + strValue2 := make([]byte, 0, len(strValue)) + for _, v := range strValue { + if v == '\'' { + isText = true + strValue2 = append(strValue2, v) + } + + if v == '#' { + isText = true + } + + if v < '0' || v > '9' { + isAllNumber = false + } + + strValue2 = append(strValue2, v) + } + + if isAllNumber && !isInt64 { + isText = true + } + + if isText { + strValue = []byte{'\''} + strValue = append(strValue, strValue2...) + strValue = append(strValue, '\'') + } else { + strValue = strValue2 + } + strValue = append(strValue, '\n') + + _, err = fd.Write(strValue) + if err != nil { + return err + } + } + + return nil +} + +func DefaultFixtureDumper(data any, fd io.Writer) error { + if data == nil { + return nil + } + + reflectedValue := reflect.ValueOf(data) + + if reflectedValue.Kind() != reflect.Ptr { + return errors.New("expected a pointer") + } + + fieldDumper, _ := data.(db.FixtureFieldDumper) + + actualValue := reflectedValue.Elem() + typeOfactualValue := actualValue.Type() + mapper := names.GonicMapper{} + + _, err := fd.Write([]byte("-\n")) + if err != nil { + return err + } + + err = defaultFixtureDumperVerbs(typeOfactualValue.Name(), actualValue, typeOfactualValue, fd, mapper, fieldDumper) + if err != nil { + return err + } + + _, err = fd.Write([]byte("\n")) + if err != nil { + return err + } + + return nil +} + +type xormTag struct { + name string + params []string +} + +type xormTagList []xormTag + +func (l xormTagList) HasTag(name string) bool { + for _, tag := range l { + name2 := strings.ToUpper(tag.name) + if name2 == name { + return true + } + } + + return false +} + +func (l xormTagList) GetFieldName(defaultName string) string { + reservedNames := []string{ + "TRUE", + "FALSE", + "BIT", + "TINYINT", + "SMALLINT", + "MEDIUMINT", + "INT", + "INTEGER", + "BIGINT", + "CHAR", + "VARCHAR", + "TINYTEXT", + "TEXT", + "MEDIUMTEXT", + "LONGTEXT", + "BINARY", + "VARBINARY", + "DATE", + "DATETIME", + "TIME", + "TIMESTAMP", + "TIMESTAMPZ", + "REAL", + "FLOAT", + "DOUBLE", + "DECIMAL", + "NUMERIC", + "TINYBLOB", + "BLOB", + "MEDIUMBLOB ", + "LONGBLOB", + "BYTEA", + "BOOL", + "SERIAL", + "BIGSERIAL", + "-", + "<-", + "->", + "PK", + "NULL", + "NOT", + "AUTOINCR", + "DEFAULT", + "CREATED", + "UPDATED", + "DELETED", + "VERSION", + "UTC", + "LOCAL", + "NOTNULL", + "INDEX", + "UNIQUE", + "CACHE", + "NOCACHE", + "COMMENT", + "EXTENDS", + "UNSIGNED", + "COLLATE", + "JSON", + } + + preTag := "" + for _, tag := range l { + if len(tag.params) > 0 { + continue + } + + if preTag == "DEFAULT" { + preTag = "" + continue + } + preTag = strings.ToUpper(tag.name) + + if util.SliceContainsString(reservedNames, strings.ToUpper(tag.name)) { + continue + } + + return tag.name + } + + return defaultName +} + +func splitXormTag(tagStr string) (xormTagList, error) { + tagStr = strings.TrimSpace(tagStr) + var ( + inQuote bool + inBigQuote bool + lastIdx int + curTag xormTag + paramStart int + tags []xormTag + ) + for i, t := range tagStr { + switch t { + case '\'': + inQuote = !inQuote + case ' ': + if !inQuote && !inBigQuote { + if lastIdx < i { + if curTag.name == "" { + curTag.name = tagStr[lastIdx:i] + } + tags = append(tags, curTag) + lastIdx = i + 1 + curTag = xormTag{} + } else if lastIdx == i { + lastIdx = i + 1 + } + } else if inBigQuote && !inQuote { + paramStart = i + 1 + } + case ',': + if !inQuote && !inBigQuote { + return nil, fmt.Errorf("comma[%d] of %s should be in quote or big quote", i, tagStr) + } + if !inQuote && inBigQuote { + curTag.params = append(curTag.params, strings.TrimSpace(tagStr[paramStart:i])) + paramStart = i + 1 + } + case '(': + inBigQuote = true + if !inQuote { + curTag.name = tagStr[lastIdx:i] + paramStart = i + 1 + } + case ')': + inBigQuote = false + if !inQuote { + curTag.params = append(curTag.params, tagStr[paramStart:i]) + } + } + } + if lastIdx < len(tagStr) { + if curTag.name == "" { + curTag.name = tagStr[lastIdx:] + } + tags = append(tags, curTag) + } + return tags, nil +} diff --git a/models/unittest/fixtures_test.go b/models/unittest/fixtures_test.go new file mode 100644 index 0000000000000..3c77dcedeb57d --- /dev/null +++ b/models/unittest/fixtures_test.go @@ -0,0 +1,145 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package unittest + +import ( + "bytes" + "testing" + + "code.gitea.io/gitea/models/db" + + "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v3" +) + +type testSub2 int64 + +func (t testSub2) String() string { + return "unknow" +} + +type testSubConversion struct{} + +func (c *testSubConversion) FromDB([]byte) error { + return nil +} + +func (c *testSubConversion) ToDB() ([]byte, error) { + return []byte("testSubConversion"), nil +} + +type TestModule2 struct { + A int64 + B int64 + C int64 +} + +func (m *TestModule2) FixtureFieldDumper(fieldName string) ([]byte, error) { + if fieldName == "A" { + return nil, db.ErrFixtureFieldDumperContinue + } + + if fieldName == "B" { + return nil, db.ErrFixtureFieldDumperSkip + } + + return []byte("hello world"), nil +} + +func TestDefaultFixtureDumper(t *testing.T) { + type TestModelSub struct { + A int64 + B int64 + } + + type TestExtern struct { + AA string + BB int + } + + type TestModel struct { + ID int64 `xorm:"pk autoincr"` + A int64 `xorm:"BIGINT DEFAULT 133 NOT NULL"` + D []string `xorm:"JSON"` + Description string `xorm:"TEXT"` + IDString string + G *TestModelSub `xorm:"-"` + W string `xorm:"-"` + TestBool bool + privateTest int64 + EmptyStr string + EmptyStr2 string `xorm:"TEXT"` + Line2 string + F testSub2 + MM int64 `xorm:"dd_ww"` + ExternVerb TestExtern `xorm:"extends"` + NumStr string + JJ *testSubConversion + FF []byte + WW []string `xorm:"TEXT"` + } + + buffer := bytes.NewBuffer(nil) + + err := DefaultFixtureDumper(&TestModel{ + ID: 12, + A: 10, + Description: "hello \" ' gitea", + D: []string{"test1", "test2"}, + W: "hello world", + IDString: "AAAAAA", + privateTest: 10, + Line2: "hello ' gitea", + F: 12, + MM: 10, + ExternVerb: TestExtern{ + AA: "hello world", + BB: 15, + }, + NumStr: "1234123412341234123412341234123412341234", + FF: []byte("hello world"), + WW: []string{"test1", "test2"}, + }, buffer) + + assert.NoError(t, err) + assert.EqualValues(t, `- + id: 12 + a: 10 + d: '["test1","test2"]' + description: 'hello " '' gitea' + id_string: AAAAAA + test_bool: false + empty_str2: '' + line2: 'hello '' gitea' + f: 12 + dd_ww: 10 + aa: hello world + bb: 15 + num_str: '1234123412341234123412341234123412341234' + jj: testSubConversion + ff: 0x68656c6c6f20776f726c64 + ww: '["test1","test2"]' + +`, buffer.String()) + + result := make([]map[string]any, 0, 10) + err = yaml.Unmarshal(buffer.Bytes(), &result) + assert.EqualValues(t, "hello \" ' gitea", result[0]["description"]) + assert.NoError(t, err) + + m2 := &TestModule2{ + A: 12, + B: 34, + C: 17, + } + + buffer = bytes.NewBuffer(nil) + err = DefaultFixtureDumper(m2, buffer) + assert.NoError(t, err) + assert.EqualValues(t, `- + a: 12 + c: hello world + +`, buffer.String()) +} diff --git a/tests/dev.ini.tmpl b/tests/dev.ini.tmpl new file mode 100644 index 0000000000000..81618e0197407 --- /dev/null +++ b/tests/dev.ini.tmpl @@ -0,0 +1,108 @@ +APP_NAME = Gitea: Git with a cup of tea +RUN_MODE = dev + +[database] +DB_TYPE = sqlite3 +PATH = {{GITEA_ROOT}}/tests/dev/gitea.db + +[indexer] +REPO_INDEXER_ENABLED = true +REPO_INDEXER_PATH = {{GITEA_ROOT}}/tests/dev/indexers/repos.bleve + +[queue.issue_indexer] +TYPE = level +DATADIR = {{GITEA_ROOT}}/tests/dev/indexers/issues.queue + +[queue] +TYPE = immediate + +[queue.code_indexer] +TYPE = immediate + +[queue.push_update] +TYPE = immediate + +[repository] +ROOT = {{GITEA_ROOT}}/tests/gitea-repositories-meta + +[repository.local] +LOCAL_COPY_PATH = {{GITEA_ROOT}}/tests/dev/tmp/local-repo + +[repository.upload] +TEMP_PATH = {{GITEA_ROOT}}/tests/dev/tmp/uploads + +[repository.signing] +SIGNING_KEY = none + +[server] +SSH_DOMAIN = {{GITEA_DEV_ADDR}} +HTTP_PORT = 3000 +ROOT_URL = http://{{GITEA_DEV_ADDR}}:3000/ +DISABLE_SSH = false +SSH_LISTEN_HOST = {{GITEA_DEV_ADDR}} +SSH_PORT = 2203 +START_SSH_SERVER = true +LFS_START_SERVER = true +OFFLINE_MODE = false +LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w +APP_DATA_PATH = {{GITEA_ROOT}}/tests/dev/data +ENABLE_GZIP = true +BUILTIN_SSH_SERVER_USER = git + +[attachment] +PATH = {{GITEA_ROOT}}/tests/dev/data/attachments + +[mailer] +ENABLED = true +PROTOCOL = dummy +FROM = sqlite-dev-test@gitea.io + +[service] +REGISTER_EMAIL_CONFIRM = false +REGISTER_MANUAL_CONFIRM = false +ENABLE_NOTIFY_MAIL = true +DISABLE_REGISTRATION = false +ENABLE_CAPTCHA = false +REQUIRE_SIGNIN_VIEW = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +NO_REPLY_ADDRESS = noreply.example.org + +[picture] +DISABLE_GRAVATAR = false +ENABLE_FEDERATED_AVATAR = false +AVATAR_UPLOAD_PATH = {{GITEA_ROOT}}/tests/dev/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = {{GITEA_ROOT}}/tests/dev/data/repo-avatars + +[session] +PROVIDER = file +PROVIDER_CONFIG = {{GITEA_ROOT}}/tests/dev/data/sessions + +[log] +MODE = console,file +ROOT_PATH = {{GITEA_ROOT}}/tests/dev/log +ENABLE_SSH_LOG = true +logger.xorm.MODE = file + +[log.file] +LEVEL = Debug + +[security] +DISABLE_GIT_HOOKS = true +INSTALL_LOCK = true + +[lfs] +PATH = {{GITEA_ROOT}}/tests/gitea-lfs-meta + +[packages] +ENABLED = true + +[markup.html] +ENABLED = true +FILE_EXTENSIONS = .html +RENDER_COMMAND = `go run build/test-echo.go` +IS_INPUT_FILE = false +RENDER_CONTENT_MODE=sanitized + +[actions] +ENABLED = true diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/commitsonpr.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/update b/tests/gitea-repositories-meta/user2/glob.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/glob.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/glob.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/glob.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/update b/tests/gitea-repositories-meta/user2/lfs.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/lfs.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/lfs.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/lfs.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/readme-test.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo-release.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/update b/tests/gitea-repositories-meta/user2/repo16.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo16.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo16.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo16.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/update b/tests/gitea-repositories-meta/user2/repo2.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo2.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo2.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user2/repo2.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive index f1f2709dddeea..4b3d452abcce2 100755 --- a/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive +++ b/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive index f1f2709dddeea..412701305369c 100755 --- a/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive +++ b/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user2/repo20.git/hooks/update b/tests/gitea-repositories-meta/user2/repo20.git/hooks/update index df5bd27f106f2..c186fe4a18b0f 100755 --- a/tests/gitea-repositories-meta/user2/repo20.git/hooks/update +++ b/tests/gitea-repositories-meta/user2/repo20.git/hooks/update @@ -1,14 +1,7 @@ #!/usr/bin/env bash -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -"${hook}" $1 $2 $3 -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive old mode 100644 new mode 100755 index f1f2709dddeea..4b3d452abcce2 --- a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive +++ b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive old mode 100644 new mode 100755 index f1f2709dddeea..412701305369c --- a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive +++ b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update old mode 100644 new mode 100755 index df5bd27f106f2..c186fe4a18b0f --- a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update +++ b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update @@ -1,14 +1,7 @@ #!/usr/bin/env bash -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -"${hook}" $1 $2 $3 -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive old mode 100644 new mode 100755 index f1f2709dddeea..4b3d452abcce2 --- a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive +++ b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive old mode 100644 new mode 100755 index f1f2709dddeea..412701305369c --- a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive +++ b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update b/tests/gitea-repositories-meta/user27/template1.git/hooks/update old mode 100644 new mode 100755 index df5bd27f106f2..c186fe4a18b0f --- a/tests/gitea-repositories-meta/user27/template1.git/hooks/update +++ b/tests/gitea-repositories-meta/user27/template1.git/hooks/update @@ -1,14 +1,7 @@ #!/usr/bin/env bash -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -"${hook}" $1 $2 $3 -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive b/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive old mode 100644 new mode 100755 index f1f2709dddeea..4b3d452abcce2 --- a/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive +++ b/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user30/renderer.git/hooks/post-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive b/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive old mode 100644 new mode 100755 index f1f2709dddeea..412701305369c --- a/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive +++ b/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive @@ -1,15 +1,7 @@ #!/usr/bin/env bash -data=$(cat) -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -echo "${data}" | "${hook}" -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user30/renderer.git/hooks/pre-receive.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/update b/tests/gitea-repositories-meta/user30/renderer.git/hooks/update old mode 100644 new mode 100755 index df5bd27f106f2..c186fe4a18b0f --- a/tests/gitea-repositories-meta/user30/renderer.git/hooks/update +++ b/tests/gitea-repositories-meta/user30/renderer.git/hooks/update @@ -1,14 +1,7 @@ #!/usr/bin/env bash -exitcodes="" -hookname=$(basename $0) -GIT_DIR=${GIT_DIR:-$(dirname $0)} - -for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do -test -x "${hook}" && test -f "${hook}" || continue -"${hook}" $1 $2 $3 -exitcodes="${exitcodes} $?" -done - -for i in ${exitcodes}; do -[ ${i} -eq 0 ] || exit ${i} -done +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user30/renderer.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user30/renderer.git/hooks/update.d/gitea old mode 100644 new mode 100755 diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive b/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive new file mode 100755 index 0000000000000..4b3d452abcce2 --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/post-receive.d"`; do + sh "$SHELL_FOLDER/post-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000000..43a948da3a983 --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive b/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive new file mode 100755 index 0000000000000..412701305369c --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do + sh "$SHELL_FOLDER/pre-receive.d/$i" +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000000..49d09406364a5 --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/update b/tests/gitea-repositories-meta/user5/repo4.git/hooks/update new file mode 100755 index 0000000000000..c186fe4a18b0f --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +ORI_DIR=`pwd` +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +cd "$ORI_DIR" +for i in `ls "$SHELL_FOLDER/update.d"`; do + sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3 +done \ No newline at end of file diff --git a/tests/gitea-repositories-meta/user5/repo4.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user5/repo4.git/hooks/update.d/gitea new file mode 100755 index 0000000000000..38101c242664a --- /dev/null +++ b/tests/gitea-repositories-meta/user5/repo4.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3 diff --git a/tests/integration/api_actions_artifact_test.go b/tests/integration/api_actions_artifact_test.go index 101bedde02788..e887d3f478af7 100644 --- a/tests/integration/api_actions_artifact_test.go +++ b/tests/integration/api_actions_artifact_test.go @@ -23,9 +23,21 @@ type getUploadArtifactRequest struct { RetentionDays int64 } -func TestActionsArtifactUploadSingleFile(t *testing.T) { +func TestActionsArtifactSingleFile(t *testing.T) { defer tests.PrepareTestEnv(t)() + t.Run("Upload", testActionsArtifactUploadSingleFile) + t.Run("Download", testActionsArtifactDownload) +} + +func TestActionsArtifactMultiFiles(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + t.Run("Upload", testActionsArtifactUploadMultipleFile) + t.Run("Download", testActionsArtifactDownloadMultiFiles) +} + +func testActionsArtifactUploadSingleFile(t *testing.T) { // acquire artifact upload url req := NewRequestWithJSON(t, "POST", "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts", getUploadArtifactRequest{ Type: "actions_storage", @@ -108,9 +120,7 @@ type ( } ) -func TestActionsArtifactDownload(t *testing.T) { - defer tests.PrepareTestEnv(t)() - +func testActionsArtifactDownload(t *testing.T) { req := NewRequest(t, "GET", "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts") req = addTokenAuthHeader(req, "Bearer 8061e833a55f6fc0157c98b883e91fcfeeb1a71a") resp := MakeRequest(t, req, http.StatusOK) @@ -141,9 +151,7 @@ func TestActionsArtifactDownload(t *testing.T) { assert.Equal(t, resp.Body.String(), body) } -func TestActionsArtifactUploadMultipleFile(t *testing.T) { - defer tests.PrepareTestEnv(t)() - +func testActionsArtifactUploadMultipleFile(t *testing.T) { const testArtifactName = "multi-files" // acquire artifact upload url @@ -198,9 +206,7 @@ func TestActionsArtifactUploadMultipleFile(t *testing.T) { MakeRequest(t, req, http.StatusOK) } -func TestActionsArtifactDownloadMultiFiles(t *testing.T) { - defer tests.PrepareTestEnv(t)() - +func testActionsArtifactDownloadMultiFiles(t *testing.T) { const testArtifactName = "multi-files" req := NewRequest(t, "GET", "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts")