Title: Link a referenced issue for its assignee, and ask for the issue first when we cannot · Issue #112 · learningequality/.github · GitHub
Open Graph Title: Link a referenced issue for its assignee, and ask for the issue first when we cannot · Issue #112 · learningequality/.github
X Title: Link a referenced issue for its assignee, and ask for the issue first when we cannot · Issue #112 · learningequality/.github
Description: ❌ 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 o...
Open Graph Description: ❌ 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 ...
X Description: ❌ 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 ...
Opengraph URL: https://github.com/learningequality/.github/issues/112
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Link a referenced issue for its assignee, and ask for the issue first when we cannot","articleBody":"\u003c!---HEADER START-->\n\n\u003cimg height=\"20px\" src=\"https://i.imgur.com/c7hUeb5.jpeg\">\n\n❌ **This issue is not open for contribution. Visit \u003ca href=\"https://learningequality.org/contributing-to-our-open-code-base/\" target=\"_blank\">Contributing guidelines\u003c/a>** to learn about the contributing process and how to find suitable issues.\n\n\u003cimg height=\"20px\" src=\"https://i.imgur.com/c7hUeb5.jpeg\">\n\n\u003c!---HEADER END-->\n\n## Overview\n\nA pull request that links no issue gets a message asking the contributor to link one. When the\ndescription already names an issue the author is assigned to, link it for them instead of\nasking. Keep the ask for every other case, and say there that the issue comes first.\n\nA pull request to a branch other than the default one never links an issue from its description,\neven with a closing keyword. Link the keyword references there the way GitHub does on the\ndefault branch.\n\n**Complexity:** Medium\n**Target branch:** main\n\n### Context\n\n`BOT_MESSAGE_LINK_ISSUE` in `scripts/constants.js`, added in #103, asks for the link. It does\nnot say that the issue comes first, and it asks for work the automation can do itself.\n\nlearningequality/kolibri#15631 is the example. The description named the issue as a markdown\nlink, so GitHub recorded a cross-reference and not a link, and a maintainer linked it by hand.\n\nGitHub reads closing keywords only on pull requests to the default branch. Every\n`release-v0.20.x` pull request in learningequality/kolibri with `Fixes #N` is unlinked, unless a\nmaintainer linked it in the sidebar, as on learningequality/kolibri#15759. #136 labels these\n`unlinked` and closes them after 7 days.\n\n`addCloseIssueReferences(issueId, pullRequestIds)` creates that link, so the description is\nnever edited. It works on any base branch. `removeCloseIssueReferences` undoes one.\n\n### The Change\n\nAll of this sits in the branch that asks for a link today, which `contributor-pr-reply.js`\ngates on an empty `getLinkedIssues` result. A closing keyword on the default branch, or a link a\nmaintainer made in the sidebar, fills that result, so nothing below runs and the reply stays as\nit is.\n\n- A helper in `scripts/utils.js`, beside `getLinkedIssues`, finds a referenced issue in the\n description: a bare `#123`, an `owner/repo#123`, an issue URL, or a markdown link to one. It\n ignores code spans, fenced blocks and HTML comments, and keeps only open issues in the same\n repository.\n- On a base other than the default branch, every candidate after a closing keyword is linked,\n whoever it is assigned to. The usual rules then apply, closing included.\n- Otherwise, one candidate with the author among its assignees is linked with\n `addCloseIssueReferences`. Being assigned is what makes a bare reference safe to act on.\n- Three replies replace the single message:\n\n| Case | Reply |\n|---|---|\n| One candidate, author is an assignee | names the issue it linked, and asks for `Closes #123` next time |\n| No candidate, or none assigned to the author | today's message, plus the issue-first sentence |\n| Several candidates assigned to the author | names them, and asks which one the pull request closes |\n\n- A keyword reference linked on another base gets no extra reply.\n- The issue-first sentence points at the contributing guidelines, so its wording follows #111.\n\n### Out of Scope\n\n- Closing a pull request because of a bare reference. Only a keyword or sidebar link closes.\n- A bare reference to an issue assigned to somebody else, as in learningequality/kolibri#15562.\n It escapes the close path today, and it still will.\n- Links across repositories, and any edit to the description.\n\n### Acceptance Criteria\n\n- [ ] One referenced open issue in the same repository, with the author among its assignees,\n is linked, and the reply names it and asks for a keyword next time.\n- [ ] All four reference forms are found, and a reference inside a code span is ignored.\n- [ ] Nothing is linked when the candidate is a pull request, a closed issue, unassigned, or\n assigned to somebody else. The reply asks.\n- [ ] Two candidates assigned to the author link neither, and the reply names both.\n- [ ] On a non-default base, `Fixes #N` is linked whoever is assigned, and the usual rules\n follow.\n- [ ] A pull request that already links an issue is untouched.\n- [ ] A pull request naming no issue gets the asking reply, with the issue-first sentence.\n- [ ] A refused mutation sends the asking reply, logs the refusal, and does not fail the run.\n- [ ] An edit that adds a reference links it the same way, without a reply.\n- [ ] Tests in `scripts/contributor-pr-reply.test.js` cover each reply, and\n `docs/community-automations.md` describes the assignee rule and the non-default base.\n\n### Testing\n\nTest in `test-actions`. See\n[testing the automations](https://github.com/learningequality/.github/blob/main/docs/testing-automations.md).\nThe cases need an account outside the organization.\n\n1. Confirm that the LE bot app's token can run `addCloseIssueReferences`. The mutation targets\n the issue, so it needs write access to issues. Run this first.\n2. Assign an issue to the outside account, then open a pull request naming it as a markdown\n link. Expect the link in the Development sidebar, and the reply that names it.\n3. Open a pull request naming an issue assigned to somebody else. Expect no link, and the ask.\n4. Open a pull request with `Closes #N`. Expect no link message.\n5. Open a pull request to a non-default branch with `Closes #N` for an issue assigned to the\n outside account. Expect the link, and review to start.\n\n### References\n\n- #103 added the message and `getLinkedIssues`.\n- #111 updates the contributing page. The issue-first sentence follows its wording.\n- #136 closes unlinked pull requests, which made the non-default base urgent.\n- learningequality/kolibri#15631 is the example.\n\n## AI usage\n\nI used Claude Code to find the message, confirm what it says today, and confirm that the\nmutation exists. The assignee rule and the decision to link are mine.\n","author":{"url":"https://github.com/akolson","@type":"Person","name":"akolson"},"datePublished":"2026-10-08T06:19:39Z","url":"https://github.com/learningequality/.github/issues/112"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:610939dc-e3ec-a867-56f9-b9f7087b4701 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5C0:18E7F5:B697F1:ED874F:6AFFEE98 |
| html-safe-nonce | cdefc25c243fe6694e68399b469e08f14021957598c3540c1d279ff5dfe6b3cc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUMwOjE4RTdGNTpCNjk3RjE6RUQ4NzRGOjZBRkZFRTk4IiwidmlzaXRvcl9pZCI6IjI3NjU0NjU5MzQwMDgxNTE3MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d9f2152da19d1051dfb0f9671ef63bbe949c6e5565d7f78a53b3f2932297e646 |
| hovercard-subject-tag | issue:5756957812 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/learningequality/.github/112/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cbec36441528186f4a306ecb7e87f2dafde368544431e9f2d22c92c532cc9889/learningequality/.github/issues/112 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cbec36441528186f4a306ecb7e87f2dafde368544431e9f2d22c92c532cc9889/learningequality/.github/issues/112 |
| og:image:alt | ❌ 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akolson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/learningequality/.github git https://github.com/learningequality/.github.git |
| octolytics-dimension-user_id | 3926525 |
| octolytics-dimension-user_login | learningequality |
| octolytics-dimension-repository_id | 647407699 |
| octolytics-dimension-repository_nwo | learningequality/.github |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 647407699 |
| octolytics-dimension-repository_network_root_nwo | learningequality/.github |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width