nodejs / nodejs/core-validate-commit

signed-off-by: skip rule when PR-URL trailer is present not only Backport-PR-URL?

未關閉 適合新手
#149 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
55
分支
62
平均合併
4 天 9 小時
30 天內合併 PR
1

描述

The signed-off-by rule currently skips backports identified by a Backport-PR-URL: trailer. This works for already-landed backport commits, but fails for backport PRs at review time because the commit-queue only adds Backport-PR-URL: at land time. even though the contributing doc explicitly exempts backports.

Rule 1 says:
https://github.com/nodejs/node/blob/e15f90559bc62b1e9a8296f1fc8654f5be261baa/doc/contributing/pull-requests.md?plain=1#L207-L208

Rule 2 says:
https://github.com/nodejs/node/blob/e15f90559bc62b1e9a8296f1fc8654f5be261baa/doc/contributing/backporting-to-release-lines.md?plain=1#L77

The lint (in core-validate-commit) says: if no Signed-off-by: AND no Backport-PR-URL: (which is added by the commit-queue), fail.

Suggestion

Treat PR-URL: trailer as the same kind of skip signal as Backport-PR-URL:. Both trailers are added by the commit-queue at land time they're never contributor-authored. Their presence on a commit being validated is a strong heuristic that the commit was either cherry-picked from a previously-landed PR (the dominant case, all backports), or is itself a previously-landed commit having its message re-validated.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 core-validate-commit 中的 Signed-off-by 規則開始,追蹤其對 Backport-PR-URL: trailer 的現有處理方式。檢查驗證測試(如果有),並確認帶有 PR-URL: 的提交無需 Signed-off-by 即可接受,而其他提交仍保留目前的要求。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
tooling
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。