Link a referenced issue for its assignee, and ask for the issue first when we cannot
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
- Bereich
- developer-experience, documentation
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, besidegetLinkedIssues, finds a referenced issue in the
description: a bare#123, anowner/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.jscover each reply, and
docs/community-automations.mddescribes the assignee rule.
Testing
Test in test-actions. See
testing the automations.
The cases need an account outside the organization.
- 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. - 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. - Open a pull request naming an issue assigned to somebody else. Expect no link, and the ask.
- 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
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus learningequality/.github
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
learningequality/.github#130 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
learningequality/.github#129 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 24/100
learningequality/.github#128 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
learningequality/.github#127 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Migrate generate-automation.js to js-yaml 5Evtl. vergeben @rtibblesbot hat das vor 2 Tagen übernommen. Offencommunity-contribution-in-progress dependencies javascript
learningequality/.github#122 · 1 Kommentar · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/.github
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Fei2411/DeepSeek-Bot#634 ·
-
beginner-friendly category:sarif community enhancement first-timers-only good first issue hacktoberfest help wanted low hanging fruit micro-contribution type: task up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
Berserk-hub150/skillhawk#244 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 8 Tagen
-
enhancement javascript python
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
jlab-sensing/ENTS-backend#851 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Pin GitHub Actions to Ubuntu 26.04Evtl. vergeben @krusty93 hat das heute übernommen. Offenchore infra:workflow-automation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 86/100
guilhermerodz/input-otp#157 · 1 Kommentar ·