Skip to content

Commit 34887cb

Browse files
authored
Merge pull request #808 from fudiwei/new-repo
move to new repo
2 parents 14a3f05 + 882bcdc commit 34887cb

File tree

888 files changed

+15592
-13413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

888 files changed

+15592
-13413
lines changed

.github/ISSUE_TEMPLATE/1-bug_report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ body:
1111
1212
**在提交 Issue 之前,请确认以下事项**:
1313
1. 我**确认**已尝试过使用当前最新版本,并能复现问题。由于开发者精力有限,非当前最新版本的问题将被直接关闭,感谢理解。
14-
2. 我**确认**已搜索过[已有的 Issues](https://github.com/usual2970/certimate/issues)(包括已关闭的),没有类似的问题。
14+
2. 我**确认**已搜索过[已有的 Issues](https://github.com/certimate-go/certimate/issues)(包括已关闭的),没有类似的问题。
1515
3. 我**确认**已阅读过[文档](https://docs.certimate.me/),没有类似的问题。
1616
4. 请**务必**按照模板规范详细描述问题,否则 Issue 将会被直接关闭。
1717
5. 请保持每个 Issue 只包含一个缺陷报告。如果有多个缺陷,请分别提交 Issue。
1818
1919
**Before you submit the issue, please make sure of the following checklist**:
2020
1. Yes, I'm using the latest release and can reproduce the issue. Issues that are not in the latest version will be closed directly.
21-
2. Yes, I've searched for [existing issues](https://github.com/usual2970/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
21+
2. Yes, I've searched for [existing issues](https://github.com/certimate-go/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
2222
3. Yes, I've read the [documentation](https://docs.certimate.me/en/) and didn't find any similar.
2323
4. Please describe the problem in detail according to the template specification, otherwise the issue will be closed directly.
2424
5. Please limit one report per issue.
@@ -76,5 +76,5 @@ body:
7676
attributes:
7777
label: 贡献 / Contribution
7878
options:
79-
- label: 我乐意为此贡献代码! / I am interested in contributing to this issue!
79+
- label: 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
8080
required: false

.github/ISSUE_TEMPLATE/2-feature_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ body:
1111
1212
**在提交 Issue 之前,请确认以下事项**:
1313
1. 我**确认**是基于当前最新大版本而提出的新功能请求或改进意见。
14-
2. 我**确认**已搜索过[已有的 Issues](https://github.com/usual2970/certimate/issues)(包括已关闭的),没有类似的问题。
14+
2. 我**确认**已搜索过[已有的 Issues](https://github.com/certimate-go/certimate/issues)(包括已关闭的),没有类似的问题。
1515
3. 我**确认**已阅读过[文档](https://docs.certimate.me/),没有类似的问题。
1616
4. 请**务必**按照模板规范详细描述问题,否则 Issue 将会被直接关闭。
1717
5. 请保持每个 Issue 只包含一个功能请求。如果有多个需求,请分别提交 Issue。
1818
1919
**Before you submit the issue, please make sure of the following checklist**:
2020
1. Yes, I'm using the latest release.
21-
2. Yes, I've searched for [existing issues](https://github.com/usual2970/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
21+
2. Yes, I've searched for [existing issues](https://github.com/certimate-go/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
2222
3. Yes, I've read the [documentation](https://docs.certimate.me/en/) and didn't find any similar.
2323
4. Please describe the problem in detail according to the template specification, otherwise the issue will be closed directly.
2424
5. Please limit one request per issue.
@@ -48,5 +48,5 @@ body:
4848
attributes:
4949
label: 贡献 / Contribution
5050
options:
51-
- label: 我乐意为此贡献代码! / I am interested in contributing to this issue!
51+
- label: 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
5252
required: false

.github/ISSUE_TEMPLATE/3-questions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ body:
99
1010
**在提交 Issue 之前,请确认以下事项**:
1111
1. 我**确认**正在使用的是当前最新版本。
12-
2. 我**确认**已搜索过[已有的 Issues](https://github.com/usual2970/certimate/issues)(包括已关闭的),没有类似的问题。
12+
2. 我**确认**已搜索过[已有的 Issues](https://github.com/certimate-go/certimate/issues)(包括已关闭的),没有类似的问题。
1313
3. 我**确认**已阅读过[文档](https://docs.certimate.me/),没有类似的问题。
1414
4. 请**务必**按照模板规范详细描述问题,否则 Issue 将会被直接关闭。
1515
5. 请保持每个 Issue 只包含一个问题求助。如果有多个问题,请分别提交 Issue。
1616
1717
**Before you submit the issue, please make sure of the following checklist**:
1818
1. Yes, I'm using the latest release.
19-
2. Yes, I've searched for [existing issues](https://github.com/usual2970/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
19+
2. Yes, I've searched for [existing issues](https://github.com/certimate-go/certimate/issues) (including closed ones) on GitHub and didn't find any similar.
2020
3. Yes, I've read the [documentation](https://docs.certimate.me/en/) and didn't find any similar.
2121
4. Please describe the problem in detail according to the template specification, otherwise the issue will be closed directly.
2222
5. Please limit one question per issue.

.github/workflows/push_image.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
uses: docker/metadata-action@v5
3333
with:
3434
images: |
35-
usual2970/certimate
36-
registry.cn-shanghai.aliyuncs.com/usual2970/certimate
35+
certimate/certimate
36+
registry.cn-shanghai.aliyuncs.com/certimate/certimate
3737
tags: |
3838
type=ref,event=branch
3939
type=ref,event=pr
@@ -61,4 +61,3 @@ jobs:
6161
platforms: linux/amd64,linux/arm64
6262
push: true
6363
tags: ${{ steps.meta.outputs.tags }}
64-

.github/workflows/push_image_next.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
uses: docker/metadata-action@v5
3232
with:
3333
images: |
34-
usual2970/certimate
35-
registry.cn-shanghai.aliyuncs.com/usual2970/certimate
34+
certimate/certimate
35+
registry.cn-shanghai.aliyuncs.com/certimate/certimate
3636
tags: |
3737
type=ref,event=tag,pattern={{version}}
3838
flavor: |

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
go env -w GOARCH=$ARCH
6666
go env -u GOARM
6767
fi
68-
go build -ldflags="-s -w -X github.com/usual2970/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/linux/certimate_${GITHUB_REF#refs/tags/}_linux_$ARCH
68+
go build -ldflags="-s -w -X github.com/certimate-go/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/linux/certimate_${GITHUB_REF#refs/tags/}_linux_$ARCH
6969
done
7070
7171
- name: Upload Linux binaries
@@ -103,7 +103,7 @@ jobs:
103103
mkdir -p dist/darwin
104104
for ARCH in amd64 arm64; do
105105
go env -w GOARCH=$ARCH
106-
go build -ldflags="-s -w -X github.com/usual2970/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/darwin/certimate_${GITHUB_REF#refs/tags/}_darwin_$ARCH
106+
go build -ldflags="-s -w -X github.com/certimate-go/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/darwin/certimate_${GITHUB_REF#refs/tags/}_darwin_$ARCH
107107
done
108108
109109
- name: Upload macOS binaries
@@ -141,7 +141,7 @@ jobs:
141141
mkdir -p dist/windows
142142
for ARCH in amd64 arm64; do
143143
go env -w GOARCH=$ARCH
144-
go build -ldflags="-s -w -X github.com/usual2970/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/windows/certimate_${GITHUB_REF#refs/tags/}_windows_$ARCH.exe
144+
go build -ldflags="-s -w -X github.com/certimate-go/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/windows/certimate_${GITHUB_REF#refs/tags/}_windows_$ARCH.exe
145145
done
146146
147147
- name: Upload Windows binaries
@@ -174,7 +174,6 @@ jobs:
174174
175175
find dist -type f -not -name "*.exe" -exec chmod +x {} \;
176176
177-
# 为每个二进制文件创建 zip 包
178177
cd dist
179178
for bin in certimate_*; do
180179
if [[ "$bin" == *".exe" ]]; then
@@ -185,7 +184,7 @@ jobs:
185184
186185
tmpdir=$(mktemp -d)
187186
cp "$bin" "${tmpdir}/${entrypoint}"
188-
cp ../README.md ../LICENSE.md ../CHANGELOG.md "$tmpdir"
187+
cp ../LICENSE ../README.md ../CHANGELOG.md "$tmpdir"
189188
190189
if [[ "$bin" == *".exe" ]]; then
191190
zip -j "${bin%.exe}.zip" "$tmpdir"/*
@@ -196,7 +195,6 @@ jobs:
196195
rm -rf "$tmpdir"
197196
done
198197
199-
# 创建校验和文件
200198
sha256sum *.zip > checksums.txt
201199
202200
- name: Create Release

.goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ builds:
1111
main: ./
1212
binary: certimate
1313
ldflags:
14-
- -s -w -X github.com/usual2970/certimate.Version={{ .Version }}
14+
- -s -w -X github.com/certimate-go/certimate.Version={{ .Version }}
1515
env:
1616
- CGO_ENABLED=0
1717
goos:
@@ -41,9 +41,9 @@ archives:
4141
builds: [build_noncgo]
4242
format: "zip"
4343
files:
44-
- CHANGELOG.md
45-
- LICENSE.md
44+
- LICENSE
4645
- README.md
46+
- CHANGELOG.md
4747

4848
checksum:
4949
name_template: "checksums.txt"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
A full changelog of past releases is available on [GitHub Releases](https://github.com/usual2970/certimate/releases) page.
1+
A full changelog of past releases is available on [GitHub Releases](https://github.com/certimate-go/certimate/releases) page.

CONTRIBUTING.md

Lines changed: 73 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,106 @@
1-
# 向 Certimate 贡献代码
1+
# 贡献指南
22

3-
感谢你抽出时间来改进 Certimate!以下是向 Certimate 主仓库提交 PR(Pull Request时的操作指南。
3+
非常感谢你抽出时间来帮助改进 Certimate!以下是向 Certimate 提交 Pull Request 时的操作指南。
44

5-
- [向 Certimate 贡献代码](#向-certimate-贡献代码)
6-
- [前提条件](#前提条件)
7-
- [修改 Go 代码](#修改-go-代码)
8-
- [修改管理页面 (Admin UI)](#修改管理页面-admin-ui)
5+
我们需要保持敏捷和快速迭代,同时也希望确保贡献者能获得尽可能流畅的参与体验。这份贡献指南旨在帮助你熟悉代码库和我们的工作方式,让你可以尽快进入有趣的开发环节。
96

10-
## 前提条件
7+
索引:
118

12-
- Go 1.24+ (用于修改 Go 代码)
13-
- Node 20+ (用于修改 UI)
9+
- [开发](#开发)
10+
- [要求](#要求)
11+
- [后端代码](#后端代码)
12+
- [前端代码](#前端代码)
13+
- [提交 PR](#提交-pr)
14+
- [提交流程](#提交流程)
15+
- [获取帮助](#获取帮助)
1416

15-
如果还没有这样做,你可以 fork Certimate 的主仓库,并克隆到本地以便进行修改:
17+
---
1618

17-
```bash
18-
git clone https://github.com/your_username/certimate.git
19-
```
19+
## 开发
20+
21+
### 要求
2022

21-
> **重要提示:**
22-
> 建议为每个 Bug 修复或新功能创建一个从 `main` 分支派生的新分支。如果你计划提交多个 PR,请保持不同的改动在独立分支中,以便更容易进行代码审查并最终合并。
23-
> 保持一个 PR 只实现一个功能。
23+
- Go 1.24+(用于修改后端代码)
24+
- Node.js 22.0+(用于修改前端代码)
2425

25-
## 修改 Go 代码
26+
### 后端代码
2627

27-
假设你已经对 Certimate 的 Go 代码做了一些修改,现在你想要运行它:
28+
Certimate 的后端代码是使用 Golang 开发的,是一个基于 [Pocketbase](https://github.com/pocketbase/pocketbase) 构建的单体应用。
2829

29-
1. 进入根目录
30-
2. 运行以下命令启动服务:
30+
假设你已经对 Certimate 的后端代码做出了一些修改,现在你想要运行它,请遵循以下步骤:
3131

32+
1. 进入根目录;
33+
2. 安装依赖:
34+
```bash
35+
go mod vendor
36+
```
37+
3. 启动本地开发服务:
3238
```bash
3339
go run main.go serve
3440
```
3541

36-
这将启动一个 Web 服务器,默认运行在 `http://localhost:8090`,并使用来自 `ui/dist` 的预构建管理页面。
37-
38-
> 如果你遇到报错 `ui/embed.go:10:12: pattern all:dist: no matching files found` 请先参考 [构建 Admin UI](#修改管理页面-admin-ui)
42+
这将启动一个 Web 服务器,默认运行在 `http://localhost:8090`,并使用来自 `/ui/dist` 的预构建管理页面。
3943

40-
**在向主仓库提交 PR 之前,建议你:**
44+
> 如果你遇到报错 `ui/embed.go: pattern all:dist: no matching files found`,请参考“[前端代码](#前端代码)”这一小节构建 WebUI。
4145
42-
- 使用 [gofumpt](https://github.com/mvdan/gofumpt) 对你的代码进行格式化。
46+
**在向主仓库提交 PR 之前,你应该:**
4347

44-
- 为你的改动添加单元测试或集成测试(Certimate 使用 Go 的标准 `testing` 包)。你可以通过以下命令运行测试(在项目根目录下):
48+
- 使用 [gofumpt](https://github.com/mvdan/gofumpt) 格式化你的代码。推荐使用 VSCode,并安装 gofumpt 插件,以便在保存时自动格式化。
49+
- 为你的改动添加单元测试或集成测试(使用 Go 标准库中的 `testing` 包)。
4550

46-
```bash
47-
go test ./...
48-
```
51+
### 前端代码
4952

50-
## 修改管理页面 (Admin UI)
53+
Certimate 的前端代码是使用 TypeScript 开发的,是一个基于 [React](https://github.com/facebook/react)[Vite](https://github.com/vitejs/vite) 构建的单页应用。
5154

52-
Certimate 的管理页面是一个基于 React 和 Vite 构建的单页应用(SPA)。
53-
54-
要启动 Admin UI:
55-
56-
1. 进入 `ui` 项目目录。
57-
58-
2. 运行 `npm install` 安装依赖。
55+
假设你已经对 Certimate 的前端代码做出了一些修改,现在你想要运行它,请遵循以下步骤:
5956

57+
1. 进入 `/ui` 目录;
58+
2. 安装依赖:
59+
```bash
60+
npm install
61+
```
6062
3. 启动 Vite 开发服务器:
61-
6263
```bash
6364
npm run dev
6465
```
6566

66-
你可以通过浏览器访问 `http://localhost:5173` 来查看运行中的管理页面
67+
这将启动一个 Web 服务器,默认运行在 `http://localhost:5173`,你可以通过浏览器访问来查看运行中的 WebUI
6768

68-
由于 Admin UI 只是一个客户端应用,运行时需要 Certimate 的后端服务作为支撑。你可以手动运行 Certimate,或者使用预构建的可执行文件。
69-
70-
所有对 Admin UI 的修改将会自动反映在浏览器中,无需手动刷新页面。
71-
72-
完成修改后,运行以下命令来构建 Admin UI,以便它能被嵌入到 Go 包中:
69+
完成修改后,运行以下命令来构建 WebUI,以便它能被嵌入到 Go 包中:
7370

7471
```bash
7572
npm run build
7673
```
7774

78-
完成所有步骤后,你可以将改动提交 PR 到 Certimate 主仓库。
75+
**在向主仓库提交 PR 之前,你应该:**
76+
77+
- 使用 [ESLint](https://github.com/eslint/eslint) 格式化你的代码。推荐使用 VSCode,并安装 ESLint+Prettier 插件,以便在保存时自动格式化。
78+
79+
## 提交 PR
80+
81+
在提交 PR 之前,请先创建一个 Issue 来讨论你的修改方案,并等待来自项目维护者的反馈。这样做有助于:
82+
83+
- 让我们充分理解你的修改内容;
84+
- 评估修改是否符合项目路线图;
85+
- 避免重复工作;
86+
- 防止你投入时间到可能无法被合并的修改中。
87+
88+
### 提交流程
89+
90+
1. Fork 本仓库;
91+
2. 在提交 PR 之前,请先发起 Issue 讨论你想要做的修改;
92+
3. 为你的修改创建一个新的分支;
93+
4. 请为你的修改添加相应的测试;
94+
5. 确保你的代码能通过现有的测试;
95+
6. 请在 PR 描述中关联相关 Issue;
96+
7. 等待合并!
97+
98+
> [!IMPORTANT]
99+
>
100+
> 建议为每个新功能或 Bug 修复创建一个从 `main` 分支派生的新分支。如果你计划提交多个 PR,请保持不同的改动在独立分支中,以便更容易进行代码审查并最终合并。
101+
>
102+
> 保持一个 PR 只实现一个功能或修复。
103+
104+
## 获取帮助
105+
106+
如果你在贡献过程中遇到困难或问题,可以通过 GitHub Issues 向我们提问。

0 commit comments

Comments
 (0)