Skip to content

Commit 092df4c

Browse files
authored
Merge pull request #96 from hotoo/feat/gitea
Feat/gitea
2 parents 25ad0c1 + 5d5b367 commit 092df4c

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
# CHANGELOG
33

4+
## 3.3.0 (2024-01-04)
5+
6+
- Feature: support [Gitea.com](https://about.gitea.com/)
7+
48
## 3.2.0 (2020-11-28)
59

610
- Feat: 内置类型也支持部分自定义配置。

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and
3333
* [GitHub](https://github.com/)
3434
* [GitLab](https://gitlab.com/)
3535
* [BitBucket](https://bitbucket.org/)
36+
* [Gitea](https://gitea.com/)
3637
* ~~[GitCafe](https://gitcafe.com/)~~ Merged into coding.net.
3738
* [Coding](https://coding.net/)
3839
* [gitee](https://gitee.com/)
@@ -89,6 +90,7 @@ $ gitopen @hotoo/gitopen # https://github.com/hotoo/gitopen
8990
Default support [github.com](https://github.com/),
9091
[bitbucket.org](https://bitbucket.org/),
9192
[gitlab.com](https://gitlab.com/),
93+
[gitea.com](https://gitea.com/),
9294
~~[gitcafe.com](https://gitcafe.com/)~~,
9395
[coding.net](https://coding.net/),
9496
[gitee.com](https://gitee.com/),
@@ -135,7 +137,7 @@ gitlab.company.net:
135137
```
136138
137139
- `github.company.com`, `gitlab.company.net` is your company's git web server domain name.
138-
- `type` is the type of your company's git web server, support `github`, `gitlab`, `gitbucket`, `coding`, `gitee`, `gitcode`, `antcode`.
140+
- `type` is the type of your company's git web server, support `github`, `gitlab`, `gitbucket`, `gitea`, `coding`, `gitee`, `gitcode`, `antcode`.
139141
- `protocol`: protocol of your company's git web server, `http` or `https`.
140142

141143
Else if you are using other custom web system build your owner git server, you need config like:

lib/scheme/gitea.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
'use strict';
2+
module.exports = {
3+
'base': '{protocol}://{hostname}/{username}/{reponame}',
4+
'home': '',
5+
'issues': '/issues',
6+
'issues/id': '/issues/{issue-id}',
7+
'issues/new': '/issues/new',
8+
'issues/new?title': '/issues/new?title={title}',
9+
'wiki': '/wiki',
10+
'network': '/activity',
11+
'tree': '/src/branch/{hash}{path}',
12+
'blob': '/src/branch/{hash}{path}',
13+
'commit': '/commit/{hash}',
14+
'commits': '/commits/branch/{branch-name}',
15+
'commits-with-branch': '/commits/branch/{branch-name}',
16+
'blame': '/blame/branch/{branch-name}/{path}',
17+
'branches': '/branches',
18+
'milestones': '/milestones',
19+
'milestones/new': '/milestones/new',
20+
'milestones/id': '/issues?q=milestone%3A{milestone-id}',
21+
'tags': '/tags',
22+
'releases': '/releases',
23+
'releases/new': '/releases/new',
24+
'releases/new-with-tag': '/releases/new?tag={tag}',
25+
'releases/edit/tag-id': '/releases/edit/{tag}',
26+
'pulls': '/pulls',
27+
'pulls/id': '/pulls/{pull-id}',
28+
'pulls/new': '/compare',
29+
'pulls/new-with-compare-branch': '/compare/{branch-B}?expand=1',
30+
'pulls/new-with-base-branch': '/compare/{branch-A}...{branch-B}?expand=1',
31+
'snippets/new': '',
32+
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitopen",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "Open git remote url in web browser from terminal.",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)