[Bug] 认领过期检查识别 PR 中的完整 Issue 链接

Open Beginner friendly
#106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, typescript, yaml
Domain
devtools

Research direction

The matching logic for linkedOpenPr and the release branch live in .github/workflows/issue-claim.yml, roughly lines 217-239 and 276-313. Start by reading how PR bodies are matched against the issue number, then reproduce with a mocked comment and PR list at a fixed time and check whether removeAssignees gets called. Done means a full-URL link and a #123 link both keep the claim, with regression cases for other-repo and nearby numbers and for a closed PR.

Written by the indexing model from the issue text.

Description

bug help wanted

An active PR can be overlooked during stale-claim cleanup when it links to the issue by full URL.

复现

用固定时间跑 stale-claims 工作流脚本。给 mock 提供一条认领超过 7 天、提醒后 3 天未回复的 Issue,并提供由认领人创建的开放 PR。PR 正文为 Fixes #123 时脚本保留认领,改成 Fixes https://github.com/ydflow/Trail/issues/123 后,脚本调用了移除认领人和标签的 API。

验收标准

  • 同一贡献者的开放 PR 用本仓 Issue 的完整 URL 或 #123 关联时,两种写法都可保护该认领。
  • 用模拟 API 加回归,覆盖同仓库完整链接、短引用、其他仓库同编号、相近编号以及 PR 已关闭的情形。

源码与测试入口

  • 检查 linkedOpenPr 的匹配与随后的释放分支。 PR 关联检查 · 释放判断
  • 测试可使用固定时间和 mock 的评论、PR 列表,断言 removeAssignees 是否被调用。

欢迎评论 /claim 认领。PR 请关联本 Issue,并附上实际执行的测试命令和结果。 贡献指南

Dominant language
TypeScript
Stars
206
Forks
37
Avg merge
8h 8m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ydflow/Trail

All issues in ydflow/Trail

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.