Closing: close/closes/closed, fix/fixes/fixed, resolve/resolves/resolved (optional ':'), lists like 'fixes #3, #4 and #5', in the MR title, description or commit messages close the issue when the MR is merged (never at creation or on close). The issue shows 'closed by !M'; a manual reopen clears it. Issues off: nothing is closed.
Back-references: any #N naming an issue in the MR title, description, notes or commit messages lists the MR on the issue (web rail section, API references, 'ermite issue show' text and JSON). Links are recomputed per MR (create, ready, notes, push, merge, moved branches), so removing a mention removes it. Limits: 100 most recent commits, 16 KiB per text, existing issues only.
Markdown: #N in issue and MR text links to the issue or MR it names.
Live: issue pages get a reload notice when a link is added or removed.
Storage: isref/ and mrref/ keys, Issue.closed_by_merge_request; repo deletion cascades.
Depends on ermite-api!7. go.mod holds a temporary local replace for bnema.dev/ermite-api, so CI fails until ermite-api v0.13.0 is tagged and the replace is swapped for the version.
ermite issue show <repo> <n> | comment <repo> <n> -m … | close <repo> <n> | reopen <repo> <n>
64
+
# issue show prints `closed by !N` when a merge closed it, and a `merge requests (K)` block (`!5 open <title> · closes`); --json adds closed_by_merge_request and references
64
65
65
66
ermite run list <repo> [--workflow …] [--branch …] [--status …]
ermite issue show <repo> <n> | comment <repo> <n> -m … | close <repo> <n> | reopen <repo> <n>
63
ermite issue show <repo> <n> | comment <repo> <n> -m … | close <repo> <n> | reopen <repo> <n>
64
+
# issue show prints `closed by !N` when a merge closed it, and a `merge requests (K)` block (`!5 open <title> · closes`); --json adds closed_by_merge_request and references
64
65
65
ermite run list <repo> [--workflow …] [--branch …] [--status …]
66
ermite run list <repo> [--workflow …] [--branch …] [--status …]
Merge requests and issues of a repository draw `#n` from one sequence, so a number names one thing: `ermite mr show myrepo 1`, `ermite issue show myrepo 2`.
36
36
37
+
## Merge request links
38
+
39
+
A merge request and the issues of its repository are linked by `#N` in its text:
40
+
41
+
- **Closing keywords** close the issue when the merge request is **merged**, and only then: `close`, `closes`, `closed`, `fix`, `fixes`, `fixed`, `resolve`, `resolves`, `resolved` (any case), then `#N`, with an optional `:` after the keyword. A list works: `fixes #3, #4 and #5`. They count in the title, the description and the commit messages, not in notes. Closing the merge request without merging closes nothing.
42
+
- **Any `#N`** in the title, description, notes or commit messages shows the merge request on the issue (`ermite issue show`, the API `references`), with its state and whether it closes the issue.
43
+
- A closed issue records the merge request that closed it ("closed by !N"). Reopening or closing by hand clears it.
44
+
- The links are recomputed whenever the merge request changes (a note added, edited or deleted, a push to its branch, a merge), so removing a mention removes the link.
45
+
- Words glued to the number (`abc#3`), `'` and `##3` are not references. Code spans are not skipped.
46
+
47
+
Limits: the 100 most recent commits of the merge request, 16 KiB of each text, 100 merge requests listed per issue. Only numbers of existing issues are linked: a mention of a number that does not exist yet is not filled in later. With issues `off`, nothing is closed.
48
+
37
49
## Inbox
38
50
39
51
The signed-in owner has an Inbox at `/-/inbox`, reached from the **Inbox** button at the top left of the home page, which shows the number of open items. It lists the open merge requests and the open issues of every repository, most recently updated first. The counters at the top (`N merge requests · M issues`) always count everything; `?repo=<name>` restricts the two lists to one repository, and the repository links under the counters set it. Repositories with issues off contribute no issues.
Merge requests and issues of a repository draw `#n` from one sequence, so a number names one thing: `ermite mr show myrepo 1`, `ermite issue show myrepo 2`.
35
Merge requests and issues of a repository draw `#n` from one sequence, so a number names one thing: `ermite mr show myrepo 1`, `ermite issue show myrepo 2`.
36
36
37
+
## Merge request links
38
+
39
+
A merge request and the issues of its repository are linked by `#N` in its text:
40
+
41
+
- **Closing keywords** close the issue when the merge request is **merged**, and only then: `close`, `closes`, `closed`, `fix`, `fixes`, `fixed`, `resolve`, `resolves`, `resolved` (any case), then `#N`, with an optional `:` after the keyword. A list works: `fixes #3, #4 and #5`. They count in the title, the description and the commit messages, not in notes. Closing the merge request without merging closes nothing.
42
+
- **Any `#N`** in the title, description, notes or commit messages shows the merge request on the issue (`ermite issue show`, the API `references`), with its state and whether it closes the issue.
43
+
- A closed issue records the merge request that closed it ("closed by !N"). Reopening or closing by hand clears it.
44
+
- The links are recomputed whenever the merge request changes (a note added, edited or deleted, a push to its branch, a merge), so removing a mention removes the link.
45
+
- Words glued to the number (`abc#3`), `'` and `##3` are not references. Code spans are not skipped.
46
+
47
+
Limits: the 100 most recent commits of the merge request, 16 KiB of each text, 100 merge requests listed per issue. Only numbers of existing issues are linked: a mention of a number that does not exist yet is not filled in later. With issues `off`, nothing is closed.
48
+
37
## Inbox
49
## Inbox
38
50
39
The signed-in owner has an Inbox at `/-/inbox`, reached from the **Inbox** button at the top left of the home page, which shows the number of open items. It lists the open merge requests and the open issues of every repository, most recently updated first. The counters at the top (`N merge requests · M issues`) always count everything; `?repo=<name>` restricts the two lists to one repository, and the repository links under the counters set it. Repositories with issues off contribute no issues.
51
The signed-in owner has an Inbox at `/-/inbox`, reached from the **Inbox** button at the top left of the home page, which shows the number of open items. It lists the open merge requests and the open issues of every repository, most recently updated first. The counters at the top (`N merge requests · M issues`) always count everything; `?repo=<name>` restricts the two lists to one repository, and the repository links under the counters set it. Repositories with issues off contribute no issues.
// as links to the form of their line; on designates the line whose form shows.
906
906
//
907
907
//hexcheck:ignore suspicious-business-logic-in-adapter places comments under the lines of the diff shown; display only
908
-
func (s *Server) placeComments(p *MRPage, repo string, n int64, comments []domain.Comment, head string, inline, canWrite bool, on *lineRef) {
908
+
func (s *Server) placeComments(ctx context.Context, p *MRPage, repo string, n int64, comments []domain.Comment, head string, inline, canWrite bool, on *lineRef) {
// as links to the form of their line; on designates the line whose form shows.
905
// as links to the form of their line; on designates the line whose form shows.
906
//
906
//
907
//hexcheck:ignore suspicious-business-logic-in-adapter places comments under the lines of the diff shown; display only
907
//hexcheck:ignore suspicious-business-logic-in-adapter places comments under the lines of the diff shown; display only
908
-
func (s *Server) placeComments(p *MRPage, repo string, n int64, comments []domain.Comment, head string, inline, canWrite bool, on *lineRef) {
908
+
func (s *Server) placeComments(ctx context.Context, p *MRPage, repo string, n int64, comments []domain.Comment, head string, inline, canWrite bool, on *lineRef) {