diff --git a/.gitea/issue_template.md b/.gitea/issue_template.md index 9ad186cca7c25..2a1bae0e201ff 100644 --- a/.gitea/issue_template.md +++ b/.gitea/issue_template.md @@ -21,7 +21,7 @@ - [ ] MySQL - [ ] MSSQL - [ ] SQLite -- Can you reproduce the bug at https://try.gitea.io: +- Can you reproduce the bug at https://demo.gitea.com: - [ ] Yes (provide example URL) - [ ] No - Log gist: diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 94c1bd0ab7078..ed29bdb4e63e6 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -37,7 +37,7 @@ body: label: Can you reproduce the bug on the Gitea demo site? description: | If so, please provide a URL in the Description field - URL of Gitea demo: https://try.gitea.io + URL of Gitea demo: https://demo.gitea.com options: - "Yes" - "No" @@ -74,7 +74,7 @@ body: attributes: label: How are you running Gitea? description: | - Please include information on whether you built Gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package + Please include information on whether you built Gitea yourself, used one of our downloads, are using https://demo.gitea.com or are using some other package Please also tell us how you are running Gitea, e.g. if it is being run from docker, a command-line, systemd etc. If you are using a package or systemd tell us what distribution you are using validations: diff --git a/.github/ISSUE_TEMPLATE/ui.bug-report.yaml b/.github/ISSUE_TEMPLATE/ui.bug-report.yaml index 387aee897b3e5..15608796742ca 100644 --- a/.github/ISSUE_TEMPLATE/ui.bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/ui.bug-report.yaml @@ -46,7 +46,7 @@ body: label: Can you reproduce the bug on the Gitea demo site? description: | If so, please provide a URL in the Description field - URL of Gitea demo: https://try.gitea.io + URL of Gitea demo: https://demo.gitea.com options: - "Yes" - "No" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d20bc258947c..a961f689d19ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,7 +77,7 @@ If your issue has not been reported yet, [open an issue](https://github.com/go-g and answer the questions so we can understand and reproduce the problematic behavior. \ Please write clear and concise instructions so that we can reproduce the behavior — even if it seems obvious. \ The more detailed and specific you are, the faster we can fix the issue. \ -It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. , as perhaps your problem has already been fixed on a current version. \ +It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. , as perhaps your problem has already been fixed on a current version. \ Please follow the guidelines described in [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) for your report. Please be kind, remember that Gitea comes at no cost to you, and you're getting free help. @@ -362,7 +362,7 @@ If you add a new feature or change an existing aspect of Gitea, the documentatio ## API v1 -The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest). +The API is documented by [swagger](http://demo.gitea.com/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest). ### GitHub API compatibility diff --git a/README.md b/README.md index f579449174472..f1ee762d52875 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This project has been [forked](https://blog.gitea.com/welcome-to-gitea/) from [Gogs](https://gogs.io) since November of 2016, but a lot has changed. -For online demonstrations, you can visit [try.gitea.io](https://try.gitea.io). +For online demonstrations, you can visit [demo.gitea.com](https://demo.gitea.com). For accessing free Gitea service (with a limited number of repositories), you can visit [gitea.com](https://gitea.com/user/login). @@ -56,7 +56,7 @@ More info: https://docs.gitea.com/installation/install-from-source ./gitea web > [!NOTE] -> If you're interested in using our APIs, we have experimental support with [documentation](https://try.gitea.io/api/swagger). +> If you're interested in using our APIs, we have experimental support with [documentation](https://demo.gitea.com/api/swagger). ## Contributing diff --git a/README_ZH.md b/README_ZH.md index 726c4273a6b34..5a52edf766e88 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -18,7 +18,7 @@ Gitea 的首要目标是创建一个极易安装,运行非常快速,安装和使用体验良好的自建 Git 服务。我们采用 Go 作为后端语言,这使我们只要生成一个可执行程序即可。并且他还支持跨平台,支持 Linux, macOS 和 Windows 以及各种架构,除了 x86,amd64,还包括 ARM 和 PowerPC。 -如果你想试用在线演示,请访问 [try.gitea.io](https://try.gitea.io/)。 +如果你想试用在线演示,请访问 [demo.gitea.com](https://demo.gitea.com/)。 如果你想使用免费的 Gitea 服务(有仓库数量限制),请访问 [gitea.com](https://gitea.com/user/login)。 diff --git a/docs/content/development/api-usage.en-us.md b/docs/content/development/api-usage.en-us.md index 94dac70b88e49..b824b9dd9565c 100644 --- a/docs/content/development/api-usage.en-us.md +++ b/docs/content/development/api-usage.en-us.md @@ -117,7 +117,7 @@ curl -v "http://localhost/api/v1/repos/search?limit=1" API Reference guide is auto-generated by swagger and available on: `https://gitea.your.host/api/swagger` or on the -[Gitea demo instance](https://try.gitea.io/api/swagger) +[Gitea demo instance](https://demo.gitea.com/api/swagger) The OpenAPI document is at: `https://gitea.your.host/swagger.v1.json` diff --git a/docs/content/help/faq.en-us.md b/docs/content/help/faq.en-us.md index ba39ec83b073b..dc575c27a78d8 100644 --- a/docs/content/help/faq.en-us.md +++ b/docs/content/help/faq.en-us.md @@ -45,7 +45,7 @@ To migrate from GitHub to Gitea, you can use Gitea's built-in migration form. In order to migrate items such as issues, pull requests, etc. you will need to input at least your username. -[Example (requires login)](https://try.gitea.io/repo/migrate) +[Example (requires login)](https://demo.gitea.com/repo/migrate) To migrate from GitLab to Gitea, you can use this non-affiliated tool: @@ -137,9 +137,9 @@ All Gitea instances have the built-in API and there is no way to disable it comp You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`. For more information, refer to Gitea's [API docs](development/api-usage.md). -You can see the latest API (for example) on https://try.gitea.io/api/swagger +You can see the latest API (for example) on https://demo.gitea.com/api/swagger -You can also see an example of the `swagger.json` file at https://try.gitea.io/swagger.v1.json +You can also see an example of the `swagger.json` file at https://demo.gitea.com/swagger.v1.json ## Adjusting your server for public/private use diff --git a/docs/content/help/faq.zh-cn.md b/docs/content/help/faq.zh-cn.md index ef8a149ae24d1..4fba37da262bf 100644 --- a/docs/content/help/faq.zh-cn.md +++ b/docs/content/help/faq.zh-cn.md @@ -47,7 +47,7 @@ menu: 为了迁移诸如问题、拉取请求等项目,您需要至少输入您的用户名。 -[Example (requires login)](https://try.gitea.io/repo/migrate) +[Example (requires login)](https://demo.gitea.com/repo/migrate) 要从GitLab迁移到Gitea,您可以使用这个非关联的工具: @@ -141,9 +141,9 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。 有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。 -您可以在上查看最新的API(例如)https://try.gitea.io/api/swagger +您可以在上查看最新的API(例如)https://demo.gitea.com/api/swagger -您还可以在上查看`swagger.json`文件的示例 https://try.gitea.io/swagger.v1.json +您还可以在上查看`swagger.json`文件的示例 https://demo.gitea.com/swagger.v1.json ## 调整服务器用于公共/私有使用 diff --git a/docs/content/help/support.en-us.md b/docs/content/help/support.en-us.md index db735b8124d2e..c7ae26906571a 100644 --- a/docs/content/help/support.en-us.md +++ b/docs/content/help/support.en-us.md @@ -39,7 +39,7 @@ If you found a bug, please [create an issue on GitHub](https://github.com/go-git - When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs. - When using docker, use `docker logs --tail 1000 ` to collect logs. 4. Reproducible steps so that others could reproduce and understand the problem more quickly and easily. - - [try.gitea.io](https://try.gitea.io) could be used to reproduce the problem. + - [demo.gitea.com](https://demo.gitea.com) could be used to reproduce the problem. 5. If you encounter slow/hanging/deadlock problems, please report the stacktrace when the problem occurs. Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report". diff --git a/docs/content/help/support.zh-cn.md b/docs/content/help/support.zh-cn.md index 91b37c586c71a..38415c9296352 100644 --- a/docs/content/help/support.zh-cn.md +++ b/docs/content/help/support.zh-cn.md @@ -39,7 +39,7 @@ menu: - 在使用 systemd 时,使用 `journalctl --lines 1000 --unit gitea` 收集日志。 - 在使用 Docker 时,使用 `docker logs --tail 1000 ` 收集日志。 4. 可重现的步骤,以便他人能够更快速、更容易地重现和理解问题。 - - [try.gitea.io](https://try.gitea.io) 可用于重现问题。 + - [demo.gitea.com](https://demo.gitea.com) 可用于重现问题。 5. 如果遇到慢速/挂起/死锁等问题,请在出现问题时报告堆栈跟踪。 转到 "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report"。 diff --git a/docs/content/index.en-us.md b/docs/content/index.en-us.md index 170bf26f71618..25eb63bb85cbd 100644 --- a/docs/content/index.en-us.md +++ b/docs/content/index.en-us.md @@ -21,7 +21,7 @@ up a self-hosted Git service. With Go, this can be done platform-independently across **all platforms** which Go supports, including Linux, macOS, and Windows, on x86, amd64, ARM and PowerPC architectures. -You can try it out using [the online demo](https://try.gitea.io/). +You can try it out using [the online demo](https://demo.gitea.com/). ## Features diff --git a/models/git/commit_status_test.go b/models/git/commit_status_test.go index 08eba6e293323..03aad812a9127 100644 --- a/models/git/commit_status_test.go +++ b/models/git/commit_status_test.go @@ -37,23 +37,23 @@ func TestGetCommitStatuses(t *testing.T) { assert.Equal(t, "ci/awesomeness", statuses[0].Context) assert.Equal(t, structs.CommitStatusPending, statuses[0].State) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[0].APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[0].APIURL(db.DefaultContext)) assert.Equal(t, "cov/awesomeness", statuses[1].Context) assert.Equal(t, structs.CommitStatusWarning, statuses[1].State) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[1].APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[1].APIURL(db.DefaultContext)) assert.Equal(t, "cov/awesomeness", statuses[2].Context) assert.Equal(t, structs.CommitStatusSuccess, statuses[2].State) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[2].APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[2].APIURL(db.DefaultContext)) assert.Equal(t, "ci/awesomeness", statuses[3].Context) assert.Equal(t, structs.CommitStatusFailure, statuses[3].State) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[3].APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[3].APIURL(db.DefaultContext)) assert.Equal(t, "deploy/awesomeness", statuses[4].Context) assert.Equal(t, structs.CommitStatusError, statuses[4].State) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[4].APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[4].APIURL(db.DefaultContext)) statuses, maxResults, err = db.FindAndCount[git_model.CommitStatus](db.DefaultContext, &git_model.CommitStatusOptions{ ListOptions: db.ListOptions{Page: 2, PageSize: 50}, diff --git a/models/issues/issue_test.go b/models/issues/issue_test.go index 1bbc0eee564fd..119b06ef515ac 100644 --- a/models/issues/issue_test.go +++ b/models/issues/issue_test.go @@ -65,7 +65,7 @@ func TestIssueAPIURL(t *testing.T) { err := issue.LoadAttributes(db.DefaultContext) assert.NoError(t, err) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/issues/1", issue.APIURL(db.DefaultContext)) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/issues/1", issue.APIURL(db.DefaultContext)) } func TestGetIssuesByIDs(t *testing.T) { diff --git a/models/repo/attachment_test.go b/models/repo/attachment_test.go index c059ffd39a91e..aa671be7adbde 100644 --- a/models/repo/attachment_test.go +++ b/models/repo/attachment_test.go @@ -75,7 +75,7 @@ func TestAttachment_DownloadURL(t *testing.T) { UUID: "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", ID: 1, } - assert.Equal(t, "https://try.gitea.io/attachments/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", attach.DownloadURL()) + assert.Equal(t, "https://demo.gitea.com/attachments/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", attach.DownloadURL()) } func TestUpdateAttachment(t *testing.T) { diff --git a/models/repo/repo_test.go b/models/repo/repo_test.go index c13b698abf148..b00bd7c764aac 100644 --- a/models/repo/repo_test.go +++ b/models/repo/repo_test.go @@ -59,7 +59,7 @@ func TestRepoAPIURL(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 10}) - assert.Equal(t, "https://try.gitea.io/api/v1/repos/user12/repo10", repo.APIURL()) + assert.Equal(t, "https://demo.gitea.com/api/v1/repos/user12/repo10", repo.APIURL()) } func TestWatchRepo(t *testing.T) { @@ -149,8 +149,8 @@ func TestGetRepositoryByURL(t *testing.T) { assert.Equal(t, repo.OwnerID, int64(2)) } - test(t, "https://try.gitea.io/user2/repo2") - test(t, "https://try.gitea.io/user2/repo2.git") + test(t, "https://demo.gitea.com/user2/repo2") + test(t, "https://demo.gitea.com/user2/repo2.git") }) t.Run("ValidGitSshURL", func(t *testing.T) { @@ -164,11 +164,11 @@ func TestGetRepositoryByURL(t *testing.T) { assert.Equal(t, repo.OwnerID, int64(2)) } - test(t, "git+ssh://sshuser@try.gitea.io/user2/repo2") - test(t, "git+ssh://sshuser@try.gitea.io/user2/repo2.git") + test(t, "git+ssh://sshuser@demo.gitea.com/user2/repo2") + test(t, "git+ssh://sshuser@demo.gitea.com/user2/repo2.git") - test(t, "git+ssh://try.gitea.io/user2/repo2") - test(t, "git+ssh://try.gitea.io/user2/repo2.git") + test(t, "git+ssh://demo.gitea.com/user2/repo2") + test(t, "git+ssh://demo.gitea.com/user2/repo2.git") }) t.Run("ValidImplicitSshURL", func(t *testing.T) { @@ -182,11 +182,11 @@ func TestGetRepositoryByURL(t *testing.T) { assert.Equal(t, repo.OwnerID, int64(2)) } - test(t, "sshuser@try.gitea.io:user2/repo2") - test(t, "sshuser@try.gitea.io:user2/repo2.git") + test(t, "sshuser@demo.gitea.com:user2/repo2") + test(t, "sshuser@demo.gitea.com:user2/repo2.git") - test(t, "try.gitea.io:user2/repo2") - test(t, "try.gitea.io:user2/repo2.git") + test(t, "demo.gitea.com:user2/repo2") + test(t, "demo.gitea.com:user2/repo2.git") }) } diff --git a/models/repo/wiki_test.go b/models/repo/wiki_test.go index 629986f741a5e..c50c4c66d71e4 100644 --- a/models/repo/wiki_test.go +++ b/models/repo/wiki_test.go @@ -19,8 +19,8 @@ func TestRepository_WikiCloneLink(t *testing.T) { repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) cloneLink := repo.WikiCloneLink() - assert.Equal(t, "ssh://sshuser@try.gitea.io:3000/user2/repo1.wiki.git", cloneLink.SSH) - assert.Equal(t, "https://try.gitea.io/user2/repo1.wiki.git", cloneLink.HTTPS) + assert.Equal(t, "ssh://sshuser@demo.gitea.com:3000/user2/repo1.wiki.git", cloneLink.SSH) + assert.Equal(t, "https://demo.gitea.com/user2/repo1.wiki.git", cloneLink.HTTPS) } func TestWikiPath(t *testing.T) { diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go index 53c9dbdd77254..74bded987bd4c 100644 --- a/models/unittest/testdb.go +++ b/models/unittest/testdb.go @@ -116,12 +116,12 @@ func MainTest(m *testing.M, testOpts ...*TestOptions) { } setting.IsInTesting = true - setting.AppURL = "https://try.gitea.io/" + setting.AppURL = "https://demo.gitea.com/" setting.RunUser = "runuser" setting.SSH.User = "sshuser" setting.SSH.BuiltinServerUser = "builtinuser" setting.SSH.Port = 3000 - setting.SSH.Domain = "try.gitea.io" + setting.SSH.Domain = "demo.gitea.com" setting.Database.Type = "sqlite3" setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master" repoRootPath, err := os.MkdirTemp(os.TempDir(), "repos") diff --git a/modules/git/submodule.go b/modules/git/submodule.go index b99c81582b70e..abaa429834ac2 100644 --- a/modules/git/submodule.go +++ b/modules/git/submodule.go @@ -61,7 +61,7 @@ func getRefURL(refURL, urlPrefix, repoFullName, sshDomain string) string { if !strings.Contains(refURI, "://") { // scp style syntax which contains *no* port number after the : (and is not parsed by net/url) - // ex: git@try.gitea.io:go-gitea/gitea + // ex: git@demo.gitea.com:go-gitea/gitea match := scpSyntax.FindAllStringSubmatch(refURI, -1) if len(match) > 0 { m := match[0] diff --git a/modules/git/submodule_test.go b/modules/git/submodule_test.go index e05f2510c4cf5..a278ac4f9b42f 100644 --- a/modules/git/submodule_test.go +++ b/modules/git/submodule_test.go @@ -23,9 +23,9 @@ func TestGetRefURL(t *testing.T) { {"git@github.com:user1/repo1.git", "/", "owner/reponame", "", "http://github.com/user1/repo1"}, {"ssh://git@git.zefie.net:2222/zefie/lge_g6_kernel_scripts.git", "/", "zefie/lge_g6_kernel", "", "http://git.zefie.net/zefie/lge_g6_kernel_scripts"}, {"git@git.zefie.net:2222/zefie/lge_g6_kernel_scripts.git", "/", "zefie/lge_g6_kernel", "", "http://git.zefie.net/2222/zefie/lge_g6_kernel_scripts"}, - {"git@try.gitea.io:go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "", "https://try.gitea.io/go-gitea/gitea"}, - {"ssh://git@try.gitea.io:9999/go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "", "https://try.gitea.io/go-gitea/gitea"}, - {"git://git@try.gitea.io:9999/go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "", "https://try.gitea.io/go-gitea/gitea"}, + {"git@demo.gitea.com:go-gitea/gitea", "https://demo.gitea.com/", "go-gitea/sdk", "", "https://demo.gitea.com/go-gitea/gitea"}, + {"ssh://git@demo.gitea.com:9999/go-gitea/gitea", "https://demo.gitea.com/", "go-gitea/sdk", "", "https://demo.gitea.com/go-gitea/gitea"}, + {"git://git@demo.gitea.com:9999/go-gitea/gitea", "https://demo.gitea.com/", "go-gitea/sdk", "", "https://demo.gitea.com/go-gitea/gitea"}, {"ssh://git@127.0.0.1:9999/go-gitea/gitea", "https://127.0.0.1:3000/", "go-gitea/sdk", "", "https://127.0.0.1:3000/go-gitea/gitea"}, {"https://gitea.com:3000/user1/repo1.git", "https://127.0.0.1:3000/", "user/repo2", "", "https://gitea.com:3000/user1/repo1"}, {"https://example.gitea.com/gitea/user1/repo1.git", "https://example.gitea.com/gitea/", "", "user/repo2", "https://example.gitea.com/gitea/user1/repo1"}, @@ -33,7 +33,7 @@ func TestGetRefURL(t *testing.T) { {"somethingbad", "https://127.0.0.1:3000/go-gitea/gitea", "/", "", ""}, {"git@localhost:user/repo", "https://localhost/", "user2/repo1", "", "https://localhost/user/repo"}, {"../path/to/repo.git/", "https://localhost/", "user/repo2", "", "https://localhost/user/path/to/repo.git"}, - {"ssh://git@ssh.gitea.io:2222/go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "ssh.gitea.io", "https://try.gitea.io/go-gitea/gitea"}, + {"ssh://git@ssh.gitea.io:2222/go-gitea/gitea", "https://demo.gitea.com/", "go-gitea/sdk", "ssh.gitea.io", "https://demo.gitea.com/go-gitea/gitea"}, } for _, kase := range kases { diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index a2ae18d777129..39e5003b92c4b 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -308,8 +308,8 @@ func TestRender_email(t *testing.T) { "/home/gitea/mailstore/info@gitea/com", `

/home/gitea/mailstore/info@gitea/com

`) test( - "git@try.gitea.io:go-gitea/gitea.git", - `

git@try.gitea.io:go-gitea/gitea.git

`) + "git@demo.gitea.com:go-gitea/gitea.git", + `

git@demo.gitea.com:go-gitea/gitea.git

`) test( "gitea@3", `

gitea@3

`) diff --git a/modules/util/util_test.go b/modules/util/util_test.go index de8f065cadc73..6f825d1a20ce1 100644 --- a/modules/util/util_test.go +++ b/modules/util/util_test.go @@ -23,18 +23,18 @@ func TestURLJoin(t *testing.T) { return test{Expected: expected, Base: base, Elements: elements} } for _, test := range []test{ - newTest("https://try.gitea.io/a/b/c", - "https://try.gitea.io", "a/b", "c"), - newTest("https://try.gitea.io/a/b/c", - "https://try.gitea.io/", "/a/b/", "/c/"), - newTest("https://try.gitea.io/a/c", - "https://try.gitea.io/", "/a/./b/", "../c/"), + newTest("https://demo.gitea.com/a/b/c", + "https://demo.gitea.com", "a/b", "c"), + newTest("https://demo.gitea.com/a/b/c", + "https://demo.gitea.com/", "/a/b/", "/c/"), + newTest("https://demo.gitea.com/a/c", + "https://demo.gitea.com/", "/a/./b/", "../c/"), newTest("a/b/c", "a", "b/c/"), newTest("a/b/d", "a/", "b/c/", "/../d/"), - newTest("https://try.gitea.io/a/b/c#d", - "https://try.gitea.io", "a/b", "c#d"), + newTest("https://demo.gitea.com/a/b/c#d", + "https://demo.gitea.com", "a/b", "c#d"), newTest("/a/b/d", "/a/", "b/c/", "/../d/"), newTest("/a/b/c", diff --git a/modules/validation/helpers_test.go b/modules/validation/helpers_test.go index 52f383f698341..049265688a820 100644 --- a/modules/validation/helpers_test.go +++ b/modules/validation/helpers_test.go @@ -47,7 +47,7 @@ func Test_IsValidURL(t *testing.T) { } func Test_IsValidExternalURL(t *testing.T) { - setting.AppURL = "https://try.gitea.io/" + setting.AppURL = "https://demo.gitea.com/" cases := []struct { description string @@ -56,7 +56,7 @@ func Test_IsValidExternalURL(t *testing.T) { }{ { description: "Current instance URL", - url: "https://try.gitea.io/test", + url: "https://demo.gitea.com/test", valid: true, }, { @@ -66,7 +66,7 @@ func Test_IsValidExternalURL(t *testing.T) { }, { description: "Current instance API URL", - url: "https://try.gitea.io/api/v1/user/follow", + url: "https://demo.gitea.com/api/v1/user/follow", valid: false, }, { @@ -89,7 +89,7 @@ func Test_IsValidExternalURL(t *testing.T) { } func Test_IsValidExternalTrackerURLFormat(t *testing.T) { - setting.AppURL = "https://try.gitea.io/" + setting.AppURL = "https://demo.gitea.com/" cases := []struct { description string diff --git a/services/convert/release_test.go b/services/convert/release_test.go index 201b27e16d964..4de44bc59d569 100644 --- a/services/convert/release_test.go +++ b/services/convert/release_test.go @@ -23,6 +23,6 @@ func TestRelease_ToRelease(t *testing.T) { apiRelease := ToAPIRelease(db.DefaultContext, repo1, release1) assert.NotNil(t, apiRelease) assert.EqualValues(t, 1, apiRelease.ID) - assert.EqualValues(t, "https://try.gitea.io/api/v1/repos/user2/repo1/releases/1", apiRelease.URL) - assert.EqualValues(t, "https://try.gitea.io/api/v1/repos/user2/repo1/releases/1/assets", apiRelease.UploadURL) + assert.EqualValues(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/releases/1", apiRelease.URL) + assert.EqualValues(t, "https://demo.gitea.com/api/v1/repos/user2/repo1/releases/1/assets", apiRelease.UploadURL) } diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go index 0739f4233fc89..e8387577d917b 100644 --- a/services/mailer/mail_test.go +++ b/services/mailer/mail_test.go @@ -269,16 +269,16 @@ func TestGenerateAdditionalHeaders(t *testing.T) { expected := map[string]string{ "List-ID": "user2/repo1 ", - "List-Archive": "", + "List-Archive": "", "X-Gitea-Reason": "dummy-reason", "X-Gitea-Sender": "user2", "X-Gitea-Recipient": "test", "X-Gitea-Recipient-Address": "test@gitea.com", "X-Gitea-Repository": "repo1", "X-Gitea-Repository-Path": "user2/repo1", - "X-Gitea-Repository-Link": "https://try.gitea.io/user2/repo1", + "X-Gitea-Repository-Link": "https://demo.gitea.com/user2/repo1", "X-Gitea-Issue-ID": "1", - "X-Gitea-Issue-Link": "https://try.gitea.io/user2/repo1/issues/1", + "X-Gitea-Issue-Link": "https://demo.gitea.com/user2/repo1/issues/1", } for key, value := range expected { diff --git a/services/repository/files/content_test.go b/services/repository/files/content_test.go index 4811f9d327a13..84309a64744d4 100644 --- a/services/repository/files/content_test.go +++ b/services/repository/files/content_test.go @@ -25,10 +25,10 @@ func getExpectedReadmeContentsResponse() *api.ContentsResponse { sha := "4b4851ad51df6a7d9f25c979345979eaeb5b349f" encoding := "base64" content := "IyByZXBvMQoKRGVzY3JpcHRpb24gZm9yIHJlcG8x" - selfURL := "https://try.gitea.io/api/v1/repos/user2/repo1/contents/" + treePath + "?ref=master" - htmlURL := "https://try.gitea.io/user2/repo1/src/branch/master/" + treePath - gitURL := "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/" + sha - downloadURL := "https://try.gitea.io/user2/repo1/raw/branch/master/" + treePath + selfURL := "https://demo.gitea.com/api/v1/repos/user2/repo1/contents/" + treePath + "?ref=master" + htmlURL := "https://demo.gitea.com/user2/repo1/src/branch/master/" + treePath + gitURL := "https://demo.gitea.com/api/v1/repos/user2/repo1/git/blobs/" + sha + downloadURL := "https://demo.gitea.com/user2/repo1/raw/branch/master/" + treePath return &api.ContentsResponse{ Name: treePath, Path: treePath, @@ -243,7 +243,7 @@ func TestGetBlobBySHA(t *testing.T) { expectedGBR := &api.GitBlobResponse{ Content: "dHJlZSAyYTJmMWQ0NjcwNzI4YTJlMTAwNDllMzQ1YmQ3YTI3NjQ2OGJlYWI2CmF1dGhvciB1c2VyMSA8YWRkcmVzczFAZXhhbXBsZS5jb20+IDE0ODk5NTY0NzkgLTA0MDAKY29tbWl0dGVyIEV0aGFuIEtvZW5pZyA8ZXRoYW50a29lbmlnQGdtYWlsLmNvbT4gMTQ4OTk1NjQ3OSAtMDQwMAoKSW5pdGlhbCBjb21taXQK", Encoding: "base64", - URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/65f1bf27bc3bf70f64657658635e66094edbcb4d", + URL: "https://demo.gitea.com/api/v1/repos/user2/repo1/git/blobs/65f1bf27bc3bf70f64657658635e66094edbcb4d", SHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", Size: 180, } diff --git a/services/repository/files/file_test.go b/services/repository/files/file_test.go index a5b3aad91e32b..b10ad7b05e29b 100644 --- a/services/repository/files/file_test.go +++ b/services/repository/files/file_test.go @@ -62,10 +62,10 @@ func getExpectedFileResponse() *api.FileResponse { }, Commit: &api.FileCommitResponse{ CommitMeta: api.CommitMeta{ - URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/commits/65f1bf27bc3bf70f64657658635e66094edbcb4d", + URL: "https://demo.gitea.com/api/v1/repos/user2/repo1/git/commits/65f1bf27bc3bf70f64657658635e66094edbcb4d", SHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", }, - HTMLURL: "https://try.gitea.io/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d", + HTMLURL: "https://demo.gitea.com/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d", Author: &api.CommitUser{ Identity: api.Identity{ Name: "user1", @@ -83,7 +83,7 @@ func getExpectedFileResponse() *api.FileResponse { Parents: []*api.CommitMeta{}, Message: "Initial commit\n", Tree: &api.CommitMeta{ - URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/trees/2a2f1d4670728a2e10049e345bd7a276468beab6", + URL: "https://demo.gitea.com/api/v1/repos/user2/repo1/git/trees/2a2f1d4670728a2e10049e345bd7a276468beab6", SHA: "2a2f1d4670728a2e10049e345bd7a276468beab6", }, }, diff --git a/services/repository/files/tree_test.go b/services/repository/files/tree_test.go index 508f20090ddc6..a9840a62940cc 100644 --- a/services/repository/files/tree_test.go +++ b/services/repository/files/tree_test.go @@ -32,7 +32,7 @@ func TestGetTreeBySHA(t *testing.T) { assert.NoError(t, err) expectedTree := &api.GitTreeResponse{ SHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", - URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/trees/65f1bf27bc3bf70f64657658635e66094edbcb4d", + URL: "https://demo.gitea.com/api/v1/repos/user2/repo1/git/trees/65f1bf27bc3bf70f64657658635e66094edbcb4d", Entries: []api.GitEntry{ { Path: "README.md", @@ -40,7 +40,7 @@ func TestGetTreeBySHA(t *testing.T) { Type: "blob", Size: 30, SHA: "4b4851ad51df6a7d9f25c979345979eaeb5b349f", - URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/4b4851ad51df6a7d9f25c979345979eaeb5b349f", + URL: "https://demo.gitea.com/api/v1/repos/user2/repo1/git/blobs/4b4851ad51df6a7d9f25c979345979eaeb5b349f", }, }, Truncated: false, diff --git a/services/webhook/matrix_test.go b/services/webhook/matrix_test.go index 058f8e3c5f983..872c66e42231d 100644 --- a/services/webhook/matrix_test.go +++ b/services/webhook/matrix_test.go @@ -73,16 +73,16 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue opened: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Issue opened: #2 crash by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue opened: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Issue opened: #2 crash by user1`, pl.FormattedBody) p.Action = api.HookIssueClosed pl, err = mc.Issue(p) require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue closed: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue closed: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.FormattedBody) }) t.Run("IssueComment", func(t *testing.T) { @@ -92,8 +92,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on issue [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] New comment on issue #2 crash by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on issue [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] New comment on issue #2 crash by user1`, pl.FormattedBody) }) t.Run("PullRequest", func(t *testing.T) { @@ -103,8 +103,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request opened: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Pull request opened: #12 Fix bug by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request opened: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Pull request opened: #12 Fix bug by user1`, pl.FormattedBody) }) t.Run("PullRequestComment", func(t *testing.T) { @@ -114,8 +114,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on pull request [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] New comment on pull request #12 Fix bug by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on pull request [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] New comment on pull request #12 Fix bug by user1`, pl.FormattedBody) }) t.Run("Review", func(t *testing.T) { @@ -126,8 +126,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Pull request review approved: #12 Fix bug by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Pull request review approved: #12 Fix bug by user1`, pl.FormattedBody) }) t.Run("Repository", func(t *testing.T) { @@ -137,8 +137,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, `[[test/repo](http://localhost:3000/test/repo)] Repository created by [user1](https://try.gitea.io/user1)`, pl.Body) - assert.Equal(t, `[test/repo] Repository created by user1`, pl.FormattedBody) + assert.Equal(t, `[[test/repo](http://localhost:3000/test/repo)] Repository created by [user1](https://demo.gitea.com/user1)`, pl.Body) + assert.Equal(t, `[test/repo] Repository created by user1`, pl.FormattedBody) }) t.Run("Package", func(t *testing.T) { @@ -148,8 +148,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, `[[GiteaContainer](http://localhost:3000/user1/-/packages/container/GiteaContainer/latest)] Package published by [user1](https://try.gitea.io/user1)`, pl.Body) - assert.Equal(t, `[GiteaContainer] Package published by user1`, pl.FormattedBody) + assert.Equal(t, `[[GiteaContainer](http://localhost:3000/user1/-/packages/container/GiteaContainer/latest)] Package published by [user1](https://demo.gitea.com/user1)`, pl.Body) + assert.Equal(t, `[GiteaContainer] Package published by user1`, pl.FormattedBody) }) t.Run("Wiki", func(t *testing.T) { @@ -160,24 +160,24 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New wiki page '[index](http://localhost:3000/test/repo/wiki/index)' (Wiki change comment) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New wiki page '[index](http://localhost:3000/test/repo/wiki/index)' (Wiki change comment) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.FormattedBody) p.Action = api.HookWikiEdited pl, err = mc.Wiki(p) require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' edited (Wiki change comment) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' edited (Wiki change comment) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.FormattedBody) p.Action = api.HookWikiDeleted pl, err = mc.Wiki(p) require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' deleted by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' deleted by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.FormattedBody) }) t.Run("Release", func(t *testing.T) { @@ -187,8 +187,8 @@ func TestMatrixPayload(t *testing.T) { require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Release created: [v1.0](http://localhost:3000/test/repo/releases/tag/v1.0) by [user1](https://try.gitea.io/user1)", pl.Body) - assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Release created: [v1.0](http://localhost:3000/test/repo/releases/tag/v1.0) by [user1](https://demo.gitea.com/user1)", pl.Body) + assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.FormattedBody) }) } diff --git a/services/webhook/slack_test.go b/services/webhook/slack_test.go index 7ebf16aba2995..fe121609c77bd 100644 --- a/services/webhook/slack_test.go +++ b/services/webhook/slack_test.go @@ -62,13 +62,13 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Issue(p) require.NoError(t, err) - assert.Equal(t, "[] Issue opened: by ", pl.Text) + assert.Equal(t, "[] Issue opened: by ", pl.Text) p.Action = api.HookIssueClosed pl, err = sc.Issue(p) require.NoError(t, err) - assert.Equal(t, "[] Issue closed: by ", pl.Text) + assert.Equal(t, "[] Issue closed: by ", pl.Text) }) t.Run("IssueComment", func(t *testing.T) { @@ -77,7 +77,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.IssueComment(p) require.NoError(t, err) - assert.Equal(t, "[] New comment on issue by ", pl.Text) + assert.Equal(t, "[] New comment on issue by ", pl.Text) }) t.Run("PullRequest", func(t *testing.T) { @@ -86,7 +86,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.PullRequest(p) require.NoError(t, err) - assert.Equal(t, "[] Pull request opened: by ", pl.Text) + assert.Equal(t, "[] Pull request opened: by ", pl.Text) }) t.Run("PullRequestComment", func(t *testing.T) { @@ -95,7 +95,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.IssueComment(p) require.NoError(t, err) - assert.Equal(t, "[] New comment on pull request by ", pl.Text) + assert.Equal(t, "[] New comment on pull request by ", pl.Text) }) t.Run("Review", func(t *testing.T) { @@ -105,7 +105,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Review(p, webhook_module.HookEventPullRequestReviewApproved) require.NoError(t, err) - assert.Equal(t, "[] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by ", pl.Text) + assert.Equal(t, "[] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by ", pl.Text) }) t.Run("Repository", func(t *testing.T) { @@ -114,7 +114,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Repository(p) require.NoError(t, err) - assert.Equal(t, "[] Repository created by ", pl.Text) + assert.Equal(t, "[] Repository created by ", pl.Text) }) t.Run("Package", func(t *testing.T) { @@ -123,7 +123,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Package(p) require.NoError(t, err) - assert.Equal(t, "Package created: by ", pl.Text) + assert.Equal(t, "Package created: by ", pl.Text) }) t.Run("Wiki", func(t *testing.T) { @@ -133,19 +133,19 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Wiki(p) require.NoError(t, err) - assert.Equal(t, "[] New wiki page '' (Wiki change comment) by ", pl.Text) + assert.Equal(t, "[] New wiki page '' (Wiki change comment) by ", pl.Text) p.Action = api.HookWikiEdited pl, err = sc.Wiki(p) require.NoError(t, err) - assert.Equal(t, "[] Wiki page '' edited (Wiki change comment) by ", pl.Text) + assert.Equal(t, "[] Wiki page '' edited (Wiki change comment) by ", pl.Text) p.Action = api.HookWikiDeleted pl, err = sc.Wiki(p) require.NoError(t, err) - assert.Equal(t, "[] Wiki page '' deleted by ", pl.Text) + assert.Equal(t, "[] Wiki page '' deleted by ", pl.Text) }) t.Run("Release", func(t *testing.T) { @@ -154,7 +154,7 @@ func TestSlackPayload(t *testing.T) { pl, err := sc.Release(p) require.NoError(t, err) - assert.Equal(t, "[] Release created: by ", pl.Text) + assert.Equal(t, "[] Release created: by ", pl.Text) }) } diff --git a/services/webhook/telegram_test.go b/services/webhook/telegram_test.go index 2fe5161b22879..380d60dde918a 100644 --- a/services/webhook/telegram_test.go +++ b/services/webhook/telegram_test.go @@ -70,13 +70,13 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.Issue(p) require.NoError(t, err) - assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\n\nissue body", pl.Message) + assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\n\nissue body", pl.Message) p.Action = api.HookIssueClosed pl, err = tc.Issue(p) require.NoError(t, err) - assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.Message) + assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.Message) }) t.Run("IssueComment", func(t *testing.T) { @@ -85,7 +85,7 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.IssueComment(p) require.NoError(t, err) - assert.Equal(t, "[test/repo] New comment on issue #2 crash by user1\nmore info needed", pl.Message) + assert.Equal(t, "[test/repo] New comment on issue #2 crash by user1\nmore info needed", pl.Message) }) t.Run("PullRequest", func(t *testing.T) { @@ -94,7 +94,7 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.PullRequest(p) require.NoError(t, err) - assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug by user1\nfixes bug #2", pl.Message) + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug by user1\nfixes bug #2", pl.Message) }) t.Run("PullRequestComment", func(t *testing.T) { @@ -103,7 +103,7 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.IssueComment(p) require.NoError(t, err) - assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug by user1\nchanges requested", pl.Message) + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug by user1\nchanges requested", pl.Message) }) t.Run("Review", func(t *testing.T) { @@ -131,7 +131,7 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.Package(p) require.NoError(t, err) - assert.Equal(t, `Package created: GiteaContainer:latest by user1`, pl.Message) + assert.Equal(t, `Package created: GiteaContainer:latest by user1`, pl.Message) }) t.Run("Wiki", func(t *testing.T) { @@ -141,19 +141,19 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.Wiki(p) require.NoError(t, err) - assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.Message) + assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.Message) p.Action = api.HookWikiEdited pl, err = tc.Wiki(p) require.NoError(t, err) - assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.Message) + assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.Message) p.Action = api.HookWikiDeleted pl, err = tc.Wiki(p) require.NoError(t, err) - assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.Message) + assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.Message) }) t.Run("Release", func(t *testing.T) { @@ -162,7 +162,7 @@ func TestTelegramPayload(t *testing.T) { pl, err := tc.Release(p) require.NoError(t, err) - assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.Message) + assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.Message) }) } diff --git a/templates/install.tmpl b/templates/install.tmpl index 965e57f21372f..5055031a9029c 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -124,7 +124,7 @@
- + {{ctx.Locale.Tr "install.domain_helper"}}
@@ -139,7 +139,7 @@
- + {{ctx.Locale.Tr "install.app_url_helper"}}
diff --git a/tests/integration/api_admin_org_test.go b/tests/integration/api_admin_org_test.go index a29d0ba1d7467..2fc3294b0e38d 100644 --- a/tests/integration/api_admin_org_test.go +++ b/tests/integration/api_admin_org_test.go @@ -27,7 +27,7 @@ func TestAPIAdminOrgCreate(t *testing.T) { UserName: "user2_org", FullName: "User2's organization", Description: "This organization created by admin for user2", - Website: "https://try.gitea.io", + Website: "https://demo.gitea.com", Location: "Shanghai", Visibility: "private", } @@ -62,7 +62,7 @@ func TestAPIAdminOrgCreateBadVisibility(t *testing.T) { UserName: "user2_org", FullName: "User2's organization", Description: "This organization created by admin for user2", - Website: "https://try.gitea.io", + Website: "https://demo.gitea.com", Location: "Shanghai", Visibility: "notvalid", } @@ -81,7 +81,7 @@ func TestAPIAdminOrgCreateNotAdmin(t *testing.T) { UserName: "user2_org", FullName: "User2's organization", Description: "This organization created by admin for user2", - Website: "https://try.gitea.io", + Website: "https://demo.gitea.com", Location: "Shanghai", Visibility: "public", } diff --git a/tests/integration/api_org_test.go b/tests/integration/api_org_test.go index 70d3a446f7688..41dc954cd4e2a 100644 --- a/tests/integration/api_org_test.go +++ b/tests/integration/api_org_test.go @@ -32,7 +32,7 @@ func TestAPIOrgCreate(t *testing.T) { UserName: "user1_org", FullName: "User1's organization", Description: "This organization created by user1", - Website: "https://try.gitea.io", + Website: "https://demo.gitea.com", Location: "Shanghai", Visibility: "limited", } @@ -108,7 +108,7 @@ func TestAPIOrgEdit(t *testing.T) { org := api.EditOrgOption{ FullName: "Org3 organization new full name", Description: "A new description", - Website: "https://try.gitea.io/new", + Website: "https://demo.gitea.com/new", Location: "Beijing", Visibility: "private", } @@ -136,7 +136,7 @@ func TestAPIOrgEditBadVisibility(t *testing.T) { org := api.EditOrgOption{ FullName: "Org3 organization new full name", Description: "A new description", - Website: "https://try.gitea.io/new", + Website: "https://demo.gitea.com/new", Location: "Beijing", Visibility: "badvisibility", }