Skip to content

Convert try.gitea.io into demo.gitea.com #31067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitea/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ui.bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <https://try.gitea.io>, 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. <https://demo.gitea.com>, 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.
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)。

Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/api-usage.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions docs/content/help/faq.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docs/content/help/faq.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,您可以使用这个非关联的工具:

Expand Down Expand Up @@ -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

## 调整服务器用于公共/私有使用

Expand Down
2 changes: 1 addition & 1 deletion docs/content/help/support.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gitea-container>` 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".

Expand Down
2 changes: 1 addition & 1 deletion docs/content/help/support.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ menu:
- 在使用 systemd 时,使用 `journalctl --lines 1000 --unit gitea` 收集日志。
- 在使用 Docker 时,使用 `docker logs --tail 1000 <gitea-container>` 收集日志。
4. 可重现的步骤,以便他人能够更快速、更容易地重现和理解问题。
- [try.gitea.io](https://try.gitea.io) 可用于重现问题。
- [demo.gitea.com](https://demo.gitea.com) 可用于重现问题。
5. 如果遇到慢速/挂起/死锁等问题,请在出现问题时报告堆栈跟踪。
转到 "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report"。

Expand Down
2 changes: 1 addition & 1 deletion docs/content/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions models/git/commit_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion models/issues/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion models/repo/attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
22 changes: 11 additions & 11 deletions models/repo/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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")
})
}

Expand Down
4 changes: 2 additions & 2 deletions models/repo/wiki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions models/unittest/testdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion modules/git/submodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions modules/git/submodule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ func TestGetRefURL(t *testing.T) {
{"[email protected]:user1/repo1.git", "/", "owner/reponame", "", "http://github.com/user1/repo1"},
{"ssh://[email protected]:2222/zefie/lge_g6_kernel_scripts.git", "/", "zefie/lge_g6_kernel", "", "http://git.zefie.net/zefie/lge_g6_kernel_scripts"},
{"[email protected]: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://[email protected]: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"},
{"https://username:[email protected]/username/repository.git", "/", "username/repository2", "", "https://username:[email protected]/username/repository"},
{"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://[email protected]:2222/go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "ssh.gitea.io", "https://try.gitea.io/go-gitea/gitea"},
{"ssh://[email protected]: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 {
Expand Down
4 changes: 2 additions & 2 deletions modules/markup/html_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ func TestRender_email(t *testing.T) {
"/home/gitea/mailstore/info@gitea/com",
`<p>/home/gitea/mailstore/info@gitea/com</p>`)
test(
"git@try.gitea.io:go-gitea/gitea.git",
`<p>git@try.gitea.io:go-gitea/gitea.git</p>`)
"git@demo.gitea.com:go-gitea/gitea.git",
`<p>git@demo.gitea.com:go-gitea/gitea.git</p>`)
test(
"gitea@3",
`<p>gitea@3</p>`)
Expand Down
16 changes: 8 additions & 8 deletions modules/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions modules/validation/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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
Expand Down
Loading