Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions community/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@
| 分支 | 用途 |
|------|------|
| `master` | 正式版,不接受 PR |
| `dev` | 开发分支,只接受项目成员的 PR |
| `extern-contrib` | **外部贡献者请提到这里** |
| `dev` | 开发分支,**所有 PR 都提到这里** |

外部贡献者先在 GitHub 上 fork 本仓库,然后:

```bash
git checkout -b my-fix origin/extern-contrib
git clone https://github.com/<你的用户名>/XMOJ-Script.git
cd XMOJ-Script
git remote add upstream https://github.com/XMOJ-Script-dev/XMOJ-Script.git
git fetch upstream && git checkout -b my-fix upstream/dev
# 改代码、在浏览器里测试……
git fetch origin && git merge origin/extern-contrib # 提 PR 前先合并最新代码
git fetch upstream && git merge upstream/dev # 提 PR 前先合并最新代码
git push -u origin my-fix
```

提到 `master` 或 `dev` 的外部 PR 会被关掉。
再从你的 fork 向本仓库的 `dev` 提 PR。第一次提 PR 时,测试等 CI 要等维护者批准后才会运行,之后的 PR 会自动运行。版本号和更新记录由维护者和 CI 处理。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tie automatic CI to a merged contribution

For contributors whose first PR is closed without merging, or who open multiple PRs before any contribution is merged, later workflow runs still require maintainer approval. The first_time_contributors policy stops requiring approval only after the user has had a commit or PR merged, not merely after submitting their first PR, so “之后的 PR 会自动运行” gives those contributors incorrect expectations; describe the threshold as having a contribution merged instead. GitHub documents the policy semantics here.

Useful? React with 👍 / 👎.


提到 `master` 的 PR 会被关掉。

## 代码风格

Expand Down
Loading