diff --git a/CHANGELOG.md b/CHANGELOG.md index 049eb5a..ef6e713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG +## 3.3.0 (2024-01-04) + +- Feature: support [Gitea.com](https://about.gitea.com/) + ## 3.2.0 (2020-11-28) - Feat: 内置类型也支持部分自定义配置。 diff --git a/README.md b/README.md index 64f216e..86f3b91 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ and * [GitHub](https://github.com/) * [GitLab](https://gitlab.com/) * [BitBucket](https://bitbucket.org/) +* [Gitea](https://gitea.com/) * ~~[GitCafe](https://gitcafe.com/)~~ Merged into coding.net. * [Coding](https://coding.net/) * [gitee](https://gitee.com/) @@ -89,6 +90,7 @@ $ gitopen @hotoo/gitopen # https://github.com/hotoo/gitopen Default support [github.com](https://github.com/), [bitbucket.org](https://bitbucket.org/), [gitlab.com](https://gitlab.com/), +[gitea.com](https://gitea.com/), ~~[gitcafe.com](https://gitcafe.com/)~~, [coding.net](https://coding.net/), [gitee.com](https://gitee.com/), @@ -135,7 +137,7 @@ gitlab.company.net: ``` - `github.company.com`, `gitlab.company.net` is your company's git web server domain name. - - `type` is the type of your company's git web server, support `github`, `gitlab`, `gitbucket`, `coding`, `gitee`, `gitcode`, `antcode`. + - `type` is the type of your company's git web server, support `github`, `gitlab`, `gitbucket`, `gitea`, `coding`, `gitee`, `gitcode`, `antcode`. - `protocol`: protocol of your company's git web server, `http` or `https`. Else if you are using other custom web system build your owner git server, you need config like: diff --git a/lib/scheme/gitea.js b/lib/scheme/gitea.js new file mode 100644 index 0000000..f3c3e43 --- /dev/null +++ b/lib/scheme/gitea.js @@ -0,0 +1,32 @@ +'use strict'; +module.exports = { + 'base': '{protocol}://{hostname}/{username}/{reponame}', + 'home': '', + 'issues': '/issues', + 'issues/id': '/issues/{issue-id}', + 'issues/new': '/issues/new', + 'issues/new?title': '/issues/new?title={title}', + 'wiki': '/wiki', + 'network': '/activity', + 'tree': '/src/branch/{hash}{path}', + 'blob': '/src/branch/{hash}{path}', + 'commit': '/commit/{hash}', + 'commits': '/commits/branch/{branch-name}', + 'commits-with-branch': '/commits/branch/{branch-name}', + 'blame': '/blame/branch/{branch-name}/{path}', + 'branches': '/branches', + 'milestones': '/milestones', + 'milestones/new': '/milestones/new', + 'milestones/id': '/issues?q=milestone%3A{milestone-id}', + 'tags': '/tags', + 'releases': '/releases', + 'releases/new': '/releases/new', + 'releases/new-with-tag': '/releases/new?tag={tag}', + 'releases/edit/tag-id': '/releases/edit/{tag}', + 'pulls': '/pulls', + 'pulls/id': '/pulls/{pull-id}', + 'pulls/new': '/compare', + 'pulls/new-with-compare-branch': '/compare/{branch-B}?expand=1', + 'pulls/new-with-base-branch': '/compare/{branch-A}...{branch-B}?expand=1', + 'snippets/new': '', +}; diff --git a/package.json b/package.json index eb04dd4..e17fdf5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitopen", - "version": "3.2.0", + "version": "3.3.0", "description": "Open git remote url in web browser from terminal.", "main": "lib/index.js", "bin": {