Skip to content

Commit c0a0c91

Browse files
authored
docs(github): update docs (#396)
* docs(github): update docs * fix
1 parent dd8a212 commit c0a0c91

File tree

5 files changed

+198
-0
lines changed

5 files changed

+198
-0
lines changed
80.4 KB
Loading
89.3 KB
Loading
64.8 KB
Loading

docs/guide/drivers/github.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
# This is the icon of the page
3+
icon: iconfont icon-state
4+
# This control sidebar order
5+
order: 40
6+
# A page can have multiple categories
7+
category:
8+
- Guide
9+
# A page can have multiple tags
10+
tag:
11+
- Storage
12+
- Guide
13+
- "302"
14+
# this page is sticky in article list
15+
sticky: true
16+
# this page will appear in starred articles
17+
star: true
18+
---
19+
# GitHub API
20+
21+
:::tip
22+
GitHub API does not support operating files larger than 100MiB and folders containing more than 100,000 sub-items.
23+
24+
All `.gitkeep` files will be managed by the driver and will be invisible to the user.
25+
26+
Operations on submodules are currently not supported.
27+
:::
28+
29+
## **Token**
30+
31+
1. Log in GitHub and visit <https://github.com/settings/tokens>.
32+
2. ![](/img/drivers/github/1.png)
33+
3. ![](/img/drivers/github/2.png)
34+
4. ![](/img/drivers/github/3.png)
35+
36+
## **Owner**
37+
38+
The owner of the repository. For example, if the URL of the repository is `github.com/AAA/BBB`, fill in `AAA` here.
39+
40+
## **Repo**
41+
42+
The name of the repository. For example, if the URL of the repository is `github.com/AAA/BBB`, fill in `BBB` here.
43+
44+
## **Ref**
45+
46+
A branch, a tag or a commit SHA. Only when a branch name is filled in is the driver writable. It defaults to the default branch if not filled.
47+
48+
## **Committer name**
49+
50+
Custom committer name, defaulting to the owner's of the token when not filled.
51+
52+
## **Committer email**
53+
54+
Custom committer name, defaulting to the owner's of the token when not filled.
55+
56+
Required when "Committer name" is filled. Required to be empty when "Committer name" is empty.
57+
58+
## **Author name**
59+
60+
Custom author name, defaulting to the owner's of the token when not filled.
61+
62+
## **Author email**
63+
64+
Custom author name, defaulting to the owner's of the token when not filled.
65+
66+
Required when "Author name" is filled. Required to be empty when "Author name" is empty.
67+
68+
## **\*\*\* commit message**
69+
70+
Custom commit message, supporting the following template variables:
71+
- `UserName`: the user operating the file.
72+
- `ObjName`: the name of the file (or the folder) operated.
73+
- `ObjPath`: the path to the file (or the folder) operated.
74+
- `ParentName`: the name of the parent folder of the file (or the folder) operated.
75+
- `ParentPath`: the path to the parent folder of the file (or the folder) operated.
76+
- `TargetName`: (when renaming) new name. (when copying and moving) the target folder name.
77+
- `TargetPath`: (when renaming) new path. (when copying and moving) the target path.
78+
79+
### **The default download method used**
80+
81+
```mermaid
82+
---
83+
title: Which download method is used by default?
84+
---
85+
flowchart TB
86+
style a1 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff
87+
style a2 fill:#ff7575,stroke:#333,stroke-width:4px
88+
subgraph ide1 [ ]
89+
a1
90+
end
91+
a1[302]:::someclass====|default|a2[user equipment]
92+
classDef someclass fill:#f96
93+
c1[local proxy]-.alternative.->a2[user equipment]
94+
b1[Download proxy URL]-.alternative.->a2[user equipment]
95+
click a1 "../drivers/common.html#webdav-policy"
96+
click b1 "../drivers/common.html#webdav-policy"
97+
click c1 "../drivers/common.html#webdav-policy"
98+
```
99+

docs/zh/guide/drivers/github.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
# This is the icon of the page
3+
icon: iconfont icon-state
4+
# This control sidebar order
5+
order: 40
6+
# A page can have multiple categories
7+
category:
8+
- Guide
9+
# A page can have multiple tags
10+
tag:
11+
- Storage
12+
- Guide
13+
- "302"
14+
# this page is sticky in article list
15+
sticky: true
16+
# this page will appear in starred articles
17+
star: true
18+
---
19+
# GitHub API
20+
21+
:::tip
22+
GitHub API 不支持操作 100M 或更大的文件,不支持操作含有超过 100,000 个子文件(夹)的文件夹。
23+
24+
本驱动会忽略仓库内的所有`.gitkeep`文件。
25+
26+
本驱动暂不支持操作子模块。
27+
:::
28+
29+
## **Token**
30+
31+
1. 登录 GitHub,访问<https://github.com/settings/tokens>
32+
2. ![](/img/drivers/github/1.png)
33+
3. ![](/img/drivers/github/2.png)
34+
4. ![](/img/drivers/github/3.png)
35+
36+
## **所有者**
37+
38+
仓库的所有者,比如仓库链接是`github.com/AAA/BBB`,这里就填`AAA`
39+
40+
## **仓库**
41+
42+
仓库名,比如仓库链接是`github.com/AAA/BBB`,这里就填`BBB`
43+
44+
## **引用**
45+
46+
分支名、tag或提交SHA,只有在填写分支名的情况下驱动才可写,不填会使用默认分支。
47+
48+
## **提交者名称**
49+
50+
自定义提交者名称,不填会使用 Token 的所有者。
51+
52+
## **提交者邮箱**
53+
54+
自定义提交者邮箱,不填会使用 Token 的所有者。
55+
56+
填写“提交者名称”时必填,未填写“提交者名称”时必不填。
57+
58+
## **作者名称**
59+
60+
自定义作者名称,不填会使用 Token 的所有者。
61+
62+
## **作者邮箱**
63+
64+
自定义作者邮箱,不填会使用 Token 的所有者。
65+
66+
填写“作者名称”时必填,未填写“作者名称”时必不填。
67+
68+
## **\*\*\*提交信息**
69+
70+
自定义提交信息,支持以下模板变量:
71+
- `UserName`: 发起操作的用户
72+
- `ObjName`: 被操作文件(夹)的名称
73+
- `ObjPath`: 被操作文件(夹)的路径
74+
- `ParentName`: 被操作文件(夹)的父文件夹名称
75+
- `ParentPath`: 被操作文件(夹)的父文件夹路径
76+
- `TargetName`: (重命名时)新名称(复制、移动时)目标文件夹名称。
77+
- `TargetPath`: (重命名时)新路径(复制、移动时)目标路径
78+
79+
### **默认使用的下载方式**
80+
81+
```mermaid
82+
---
83+
title: 默认使用的哪种下载方式?
84+
---
85+
flowchart TB
86+
style a1 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff
87+
style a2 fill:#ff7575,stroke:#333,stroke-width:4px
88+
subgraph ide1 [ ]
89+
a1
90+
end
91+
a1[302]:::someclass====|默认|a2[用户设备]
92+
classDef someclass fill:#f96
93+
c1[本机代理]-.备选.->a2[用户设备]
94+
b1[代理URL]-.备选.->a2[用户设备]
95+
click a1 "../drivers/common.html#webdav-策略"
96+
click b1 "../drivers/common.html#webdav-策略"
97+
click c1 "../drivers/common.html#webdav-策略"
98+
```
99+

0 commit comments

Comments
 (0)