issue
Require a linked issue, and check its state on the tracker.
Science officer: Fascinating claim. Source?
needs context What to pass
Quick reference
| Written as | Fails with | Applies to |
|---|---|---|
issue. fix: opt-in | missing-issue-link error | section |
issue. | unknown-issue errorissue-wrong-state errormissing-context errorinvalid-context-state error | section |
Examples
issue. keyword
Require a linked issue introduced by one of these keywords (Fixes, Closes, Resolves, ...).
A closing keyword before the issue number passes
<!-- mdv: section issue.keyword=[Fixes, Closes] -->
## Hangar Tracking
<!-- mdv: endsection -->## Hangar Tracking
Fixes #123✓ passes
A bare issue mention without a keyword is flagged
<!-- mdv: section issue.keyword=[Fixes, Closes] -->
## Hangar Tracking
<!-- mdv: endsection -->## Hangar Tracking
See also #123✗ missing-issue-link error · line 3
issue. state
Require the linked issue to be in a given state (open / closed / any). The state comes from --context; without it the rule reports a missing-context warning rather than passing silently. The scaffolded CI does not pass --context, so issue.state is for local or custom-CI use.
A linked issue that is open passes
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->{ "issues": [{ "number": 123, "state": "open" }] }## Droid Bay Tracking
Fixes #123✓ passes
A linked issue that is already closed is flagged
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->{ "issues": [{ "number": 123, "state": "closed" }] }## Droid Bay Tracking
Fixes #123✗ issue-wrong-state error · line 3
A run with no issue data could not check the document
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->## Droid Bay Tracking
Fixes #123✗ missing-context error
See also: Gate PR bodies