Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen Anfängerfreundlich
#112 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript

Rechercherichtung

Lies scripts/constants.js für BOT_MESSAGE_LINK_ISSUE und sieh dir die Aktualisierung der Beitragsseite in #111 an, um die vereinbarte Formulierung zu prüfen. Aktualisiere die Nachricht so, dass Mitwirkende gebeten werden, beim nächsten Mal zuerst ein Issue zu eröffnen und auf die Richtlinien zu verlinken; führe scripts/contributor-pr-reply.test.js aus, um zu überprüfen, dass der Hinweis bei nicht verknüpften Pull Requests angehängt und bei verknüpften weggelassen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

❌ 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.

Vorherrschende Sprache
JavaScript
Sterne
1
Forks
7
Ø Merge
2 T. 8 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus learningequality/.github

Alle Issues in learningequality/.github

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.