File tree Expand file tree Collapse file tree 5 files changed +535
-6
lines changed Expand file tree Collapse file tree 5 files changed +535
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
## 如何贡献
6
6
7
+ > [ !TIP]
8
+ > 在贡献本项目前,请先阅读程序的[ 开发文档] ( https://github.com/DuckDuckStudio/GitHubView/tree/master/ghv/docs ) ,如对文档有疑问,请提出新的优化分类 Issue。
9
+
7
10
1 . ** Fork 仓库** :点击右上角的 "Fork" 按钮,将仓库复制到您的 GitHub 账户中。
8
11
2 . ** 克隆仓库** :将 Fork 的仓库克隆到本地计算机。
9
12
``` bash
23
26
` ` ` bash
24
27
git push origin feature/your-feature-name
25
28
` ` `
26
- 7. ** 创建 Pull Request** :在 GitHub 上创建一个 Pull Request,描述您的更改并请求合并。
29
+ 7. ** 创建 Pull Request** :在 GitHub 上创建一个 ** 指向 ` develop ` 分支的 ** Pull Request,描述您的更改并请求合并。
27
30
28
31
# ## 本地调试
29
32
1. 安装依赖:
41
44
dotnet run --project ghv < 命令或参数>
42
45
` ` `
43
46
44
- # # 代码规范
45
-
46
- - 请确保您的代码符合项目的代码风格。
47
- - 提交前请运行所有测试并确保它们通过。
48
-
49
47
# # 报告问题
50
48
51
49
如果您发现了一个问题,请通过 GitHub Issues 报告。请提供尽可能详细的信息,以帮助我们重现和解决问题。
Original file line number Diff line number Diff line change
1
+ # ghv about 命令
2
+
3
+ ## 在这里我们需要做什么
4
+ 接收到执行指令后,显示一个带有程序信息的表格。
5
+
6
+ ## 如何实现表格显示
7
+ 我使用第三方库 [ Spectre.Console] ( https://spectreconsole.net/ ) 来实现表格显示,官方文档: https://spectreconsole.net/widgets/table
8
+
9
+ ## 如何区分开发版本与发行版本
10
+ ``` csharp
11
+ using Spectre .Console ;
12
+
13
+ /* 条件表达式
14
+ string versionLink = Program.Version == "develop"
15
+ ? $"[link=https://github.com/DuckDuckStudio/GitHubView/tree/{Program.Version}][yellow]{Program.Version}[/][/]"
16
+ : $"[link=https://github.com/DuckDuckStudio/GitHubView/releases/tag/{Program.Version}]{Program.Version}[/]";
17
+ table.AddRow("版本", versionLink);
18
+ */
19
+
20
+ Table table = new ();
21
+ table .AddColumn (" 条目" );
22
+ table .AddColumn (" 内容" );
23
+
24
+ string versionLink ;
25
+ if (Program .Version == " develop" ) // 从主程序 (Program.cs) 中获取版本号
26
+ {
27
+ versionLink = $" [link=https://github.com/DuckDuckStudio/GitHubView/tree/{Program .Version }][yellow]{Program .Version }[/][/]" ;
28
+ }
29
+ else
30
+ {
31
+ versionLink = $" [link=https://github.com/DuckDuckStudio/GitHubView/releases/tag/{Program .Version }]{Program .Version }[/]" ;
32
+ }
33
+
34
+ table .AddRow (" 版本" , versionLink );
35
+ ```
You can’t perform that action at this time.
0 commit comments