Skip to content

Commit c75e408

Browse files
committed
docs: add forbidden behavior
1 parent f7e1583 commit c75e408

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

src/joinus/advanced/script-standard.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@ const element = $('.some-unique-element-that-appears-only-once').last();
129129
```
130130
:::
131131

132+
## Forbidden behavior
133+
134+
### False attribution
135+
136+
Do not list another developer's GitHub ID in the `maintainers` field of a route unless they have explicitly agreed. Only list GitHub IDs that belong to you or to contributors who have given you permission.
137+
138+
```ts
139+
export const route: Route = {
140+
// ...
141+
name: 'Some route',
142+
maintainers: ['some-other-developer-who-never-agreed'],
143+
handler,
144+
};
145+
```
146+
147+
Each offense results in a temporary ban (1 month) from submitting pull requests. Bans are enforced via [vouch](https://github.com/mitchellh/vouch). New PRs from a banned author will be closed automatically. A maintainer can lift the ban once the circumstances have been reviewed.
148+
132149
## v2 Route Standard
133150

134151
:::danger
@@ -137,6 +154,8 @@ The v2 Route Standard is deprecated. All new routes should follow the [Create Ro
137154

138155
:::
139156

157+
::::details
158+
140159
When creating a new route in RSSHub, you need to organize your files in a specific way. Your namespace folder should be stored in the `lib/routes` directory and should include three mandatory files:
141160

142161
- `router.ts` Registers the routes
@@ -199,6 +218,8 @@ Remember to remove all build artifacts in `assets/build/` before committing.
199218

200219
:::
201220

221+
::::
222+
202223
## v1 Route Standard
203224

204225
:::danger

src/zh/joinus/advanced/script-standard.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@ const element = $('.some-unique-element-that-appears-only-once').last();
129129
```
130130
:::
131131

132+
## 禁止行为
133+
134+
### 虚假署名
135+
136+
严禁在路由的 `maintainers` 字段中填写其他开发者的 GitHub ID,除非对方已明确同意。仅填写属于您自己或已获得本人许可的贡献者的 GitHub ID。
137+
138+
```ts
139+
export const route: Route = {
140+
// ...
141+
name: '某路由',
142+
maintainers: ['未经同意的其他开发者'],
143+
handler,
144+
};
145+
```
146+
147+
每次违规将导致临时禁止提交 PR(1 个月)。禁令通过 [vouch](https://github.com/mitchellh/vouch) 机制执行。被禁作者新提交的 PR 将被自动关闭。维护者在审查具体情况后可以解除禁令。
148+
132149
## v2 路由规范
133150

134151
:::danger
@@ -137,6 +154,8 @@ v2 路由规范已被弃用。所有新路由都应遵循[制作路由](/joinus/
137154

138155
:::
139156

157+
::::details
158+
140159
当在 RSSHub 中编写新的路由时,需要按特定方式组织文件。命名空间文件夹应该存储在 `lib/routes` 目录下,并且应包括三个必需文件:
141160

142161
- `router.ts` 注册路由
@@ -197,6 +216,8 @@ RSSHub 会将所有路由命名空间的文件夹名附加到路由前面。路
197216

198217
:::
199218

219+
::::
220+
200221
<!-- markdownlint-enable MD046 -->
201222

202223
## v1 路由规范

0 commit comments

Comments
 (0)