GitHub PR流程

Step 1:Fork 官方仓库(必须)

Fork the repository using the following link

操作:


Step 2:本地 clone 你的 fork(不是 clone 官方)

git clone https://github.com/<yourname>/mimic-code.git cd mimic-code

然后加 upstream(强烈推荐,但官方没写):

git remote add upstream https://github.com/MIT-LCP/mimic-code.git git remote -v


Step 3:新建一个功能分支(非常重要)

git checkout -b feat/concepts-postgres-sofa

原因:

  • 官方 reviewers 不希望你直接在 master/main 上改

  • 分支名清楚表达:feat / fix / docs


Step 4:按官方"concepts"范式写代码

官方给了一个非常重要的示例

ventilation durations can be acquired by creating the ventdurations view in
concepts/durations/ventilation_durations.sql

这意味着你应该遵循:

1️⃣ 放在正确目录

例如:

concepts/ sepsis/ sepsis3.sql firstday/ first_day_sofa.sql durations/ ventilation_durations.sql

不要:

  • 随意新建奇怪目录

  • 把 SQL 放在根目录

Step 5:本地验证(PR 是否通过的核心)

官方虽然没写,但 reviewers 一定会默认你做过验证

你至少应该能在 PR 里回答:

  • PostgreSQL 版本(例如 14 / 15)

  • MIMIC 版本(MIMIC-III v1.4 / MIMIC-IV v2.2)

  • 如何运行:

    psql -f concepts/xxx/your_view.sql

  • 是否成功创建 view

  • 大概耗时(分钟级 / 秒级)

👉 这是你和"只会写 SQL 的人"的分水岭


Step 6:Commit(注意 License 已默认同意)

先add再commit

复制代码
# 带提交信息的 commit(推荐)
git commit -m "Feat: add SOFA related PostgreSQL scripts"

# 如果你之前想执行无参数的 git commit(会打开编辑器写信息),也可以直接执行
git commit

官方已经写清楚:

By committing your code ... you agree to release under MIT License

所以:

  • 不需要额外声明

  • 不要引入 GPL / 非 MIT 代码


Step 7:Push 到你的 fork

git push origin feat/concepts-postgres-sofa


Step 8:在 GitHub 上提交 Pull Request

  • base repo:MIT-LCP/mimic-code

  • base branch:mastermain

  • compare:你刚才的分支

  • 打开 PR 链接

    • 方式 1:推送成功后,终端里会给出 PR 链接(类似 https://github.com/troojx/mimic-code/pull/new/feat/concepts-postgres-sofa),直接复制到浏览器打开;
    • 方式 2:手动打开 GitHub → 进入你的 mimic-code 仓库 → 点击顶部的「Pull requests」→ 点击「New pull request」→ 选择你的分支 feat/concepts-postgres-sofa 作为「compare」分支,选择目标分支(通常是原仓库的 main/master,如果是 fork 仓库要选对上游)。
  • 填写 PR 信息(关键,影响 Review 效率)

    • Title :保持和 commit 信息一致且简洁,比如 Feat: add SOFA related PostgreSQL scripts
    • Description :简要说明你做的修改(比如 "新增 / 优化了 PostgreSQL 版本的 SOFA 评分相关脚本,包括 pivot 目录、sepsis3.sql 等文件"),如果有相关的 issue 编号,也可以关联上(比如 Fixes #123)。
  • 提交 PR:确认信息无误后,点击「Create pull request」按钮,PR 就提交成功了。

第一次为开源社区贡献自己的代码,非常兴奋

相关推荐
m0_743697593 小时前
关于ftp与SELinux的冲突问题
git·github
凌奕4 小时前
我读了六个 Coding Agent 的上下文压缩源码,发现网上流传的数据一半是错的
github·agent·claude
一次旅行8 小时前
act本地预跑GitHub Actions:Python项目完整CI/CD流水线实战
python·ci/cd·github
敢敢是只喵i8 小时前
Agent 为什么需要 guidance,但不能把 guidance 当成安全策略?
github·aigc
不简说8 小时前
JS 代码技巧 vol.9 — 20 个设计模式在真实项目里的应用
前端·javascript·github
逛逛GitHub9 小时前
很多神级开源 Agent 从它演化而来:77K Star 的 Pi 太强了。
github
今夕资源网10 小时前
SayIt语音输入+AI 润色 Typeless 替代品 GitHub开源语音输入法,可本地部署LLM亦可接入deepseek 或者其他大模型。
人工智能·开源·github·输入法·开源输入法·语音输入法
chaors1 天前
DeepResearchSystem 0x03:HITL
llm·github·ai编程
OpenTiny社区1 天前
Loop Engineering:让 AI Agent 自己跑起来的工程方法
前端·github
木心术11 天前
GitHub Actions自动化运维实战:从CI/CD到全链路DevOps
运维·自动化·github