Skip to content

Commit

Permalink
Merge pull request #96 from hotoo/feat/gitea
Browse files Browse the repository at this point in the history
Feat/gitea
  • Loading branch information
hotoo authored Jan 4, 2024
2 parents 25ad0c1 + 5d5b367 commit 092df4c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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: 内置类型也支持部分自定义配置。
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down Expand Up @@ -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/),
Expand Down Expand Up @@ -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:
Expand Down
32 changes: 32 additions & 0 deletions lib/scheme/gitea.js
Original file line number Diff line number Diff line change
@@ -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': '',
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 092df4c

Please sign in to comment.