Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Link a referenced issue for its assignee, and ask for the issue first when we cannot

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

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
75/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript

研究方向

閱讀 scripts/constants.js 中的 BOT_MESSAGE_LINK_ISSUE,並查看 #111 中貢獻者頁面的更新,以確認議定的措辭。更新訊息,請貢獻者下次先建立 issue 並連結至指南;執行 scripts/contributor-pr-reply.test.js,確認未連結的 pull request 會附加提示,而已連結的 pull request 不會附加提示。

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

描述

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

A pull request that links no issue gets a message asking the contributor to link one. When the
description already names an issue the author is assigned to, link it for them instead of
asking. Keep the ask for every other case, and say there that the issue comes first.

Complexity: Medium
Target branch: main

Context

BOT_MESSAGE_LINK_ISSUE in scripts/constants.js, added in #103, asks for the link. It does
not say that the issue comes first, and it asks for work the automation can do itself.

learningequality/kolibri#15631 is the example. The description named the issue as a markdown
link, so GitHub recorded a cross-reference and not a link, and a maintainer linked it by hand.

addCloseIssueReferences(issueId, pullRequestIds) creates that link, so the description is
never edited. removeCloseIssueReferences undoes one.

The Change

All of this sits in the branch that asks for a link today, which contributor-pr-reply.js:54
gates on an empty getLinkedIssues result. A closing keyword, or a link a maintainer made in
the sidebar, fills that result, so nothing below runs and the reply stays as it is.

  • A helper in scripts/utils.js, beside getLinkedIssues, finds a referenced issue in the
    description: a bare #123, an owner/repo#123, an issue URL, or a markdown link to one. It
    ignores code spans and fenced blocks, and keeps only open issues in the same repository.
  • One candidate with the author among its assignees is linked with addCloseIssueReferences.
    Being assigned is what makes a parsed reference safe to act on. Nothing else is linked.
  • Three replies replace the single message:
Case Reply
One candidate, author is an assignee names the issue it linked, and asks for Closes #123 next time
No candidate, or none assigned to the author today's message, plus the issue-first sentence
Several candidates assigned to the author names them, and asks which one the pull request closes
  • The issue-first sentence points at the contributing guidelines, so its wording follows #111.
  • A refused mutation sends the asking reply and logs the refusal. It never reports a link it
    did not make.
Out of Scope
  • Closing a pull request because of a parsed reference. #103 closes on a real link only.
  • A referenced issue assigned to somebody else, as in learningequality/kolibri#15562. It
    escapes the close path today, and it still will.
  • A reference added in a later edit. The automation runs on opened.
  • Links across repositories, and any edit to the description.
Acceptance Criteria
  • One referenced open issue in the same repository, with the author among its assignees,
    is linked, and the reply names it and asks for a keyword next time.
  • All four reference forms are found, and a reference inside a code span is ignored.
  • Nothing is linked when the candidate is a pull request, a closed issue, unassigned, or
    assigned to somebody else. The reply asks.
  • Two candidates assigned to the author link neither, and the reply names both.
  • A pull request that already links an issue is untouched.
  • A pull request naming no issue gets the asking reply, with the issue-first sentence.
  • A refused mutation sends the asking reply and does not fail the run.
  • Tests in scripts/contributor-pr-reply.test.js cover each reply, and
    docs/community-automations.md describes the assignee rule.
Testing

Test in test-actions. See
testing the automations.
The cases need an account outside the organization.

  1. Confirm that the LE bot app's token can run addCloseIssueReferences. The mutation targets
    the issue, so it needs write access to issues. Run this first.
  2. Assign an issue to the outside account, then open a pull request naming it as a markdown
    link. Expect the link in the Development sidebar, and the reply that names it.
  3. Open a pull request naming an issue assigned to somebody else. Expect no link, and the ask.
  4. Open a pull request with Closes #N. Expect no link message.
References
  • #103 added the message and getLinkedIssues.
  • #111 updates the contributing page. The issue-first sentence follows its wording.
  • learningequality/kolibri#15631 is the example.

AI usage

I used Claude Code to find the message, confirm what it says today, and confirm that the
mutation exists. The assignee rule and the decision to link are mine.

主要語言
JavaScript
星號
1
分支
7
平均合併
2 天 8 小時
30 天內合併 PR
10

環境準備

從這裡開始

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

learningequality/.github 的其他 Issue

查看 learningequality/.github 的全部 Issue

相似的 Issue

更多 JavaScript Issue

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

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