ER: Blank PRs get commented on for formatting issues too

未关闭 适合新手
#8,871 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
67/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, javascript
领域
ci-cd, tooling

调研方向

阅读 ~/github-actions/trigger-pr/check-linked-issue.js,特别是第 105 行,该行指出 pr.body 为空时会发生故障。首先检查 action 如何处理拉取请求正文,并查看 PR #8815 中链接的故障报告;使用提供的 GitHub Actions 测试指南在个人环境中运行它。完成标准是 action 能处理空白的 PR 正文,并留下预期的评论。

由索引模型根据 Issue 内容生成。

描述

Complexity: Small ER Feature: Refactor GHA Issue Making: Level 2 ready for merge team role: back end/devOps size: 0.25pt
Emergent Requirement - Problem

We should make sure that check-linked-issue.js can handle blank PRs as well. That code currently helps to check PRs for proper formatting to make sure an issue is linked, but it fails if the PR it is checking is blank.

Issue you discovered this emergent requirement in
  • #8815
Date discovered

10-24-2026

Did you have to do something temporarily
  • YES
  • NO
Who was involved

@castillios
@daras-cu

What happens if this is not addressed

If a blank PR get published, the PR to check for a a properly linked issue does not leave any comment on the PR to notify the author of an issue.

Resources
Recommended Action Items
  • Make a new issue
  • Discuss with team
  • Let a Team Lead know
Potential solutions [draft]

Issue:

  • Complexity: Small (While the suggested change here only requires changing one line of code, I gave it the Complexity: Small label because it requires testing GitHub Actions.)
  • Relationships: None
  • Size: 0.25pt
  • Fix:
    in ~/github-actions/trigger-pr/check-linked-issue.js (line 105), change:
const match = pr.body.match(regex); 

... to:

const match = (pr.body ?? '').match(regex);
主要语言
JavaScript
星标
365
派生
872
平均合并
8 天 19 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hackforla/website 的其他 Issue

查看 hackforla/website 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。