issue

Require a linked issue, and check its state on the tracker.

Science officer: Fascinating claim. Source?

needs context What to pass

Quick reference

Examples

issue.keyword

Require a linked issue introduced by one of these keywords (Fixes, Closes, Resolves, ...).

A closing keyword before the issue number passes

contract.mdv.md
<!-- mdv: section issue.keyword=[Fixes, Closes] -->
## Hangar Tracking
<!-- mdv: endsection -->
document.md
## Hangar Tracking

Fixes #123

✓ passes

A bare issue mention without a keyword is flagged

contract.mdv.md
<!-- mdv: section issue.keyword=[Fixes, Closes] -->
## Hangar Tracking
<!-- mdv: endsection -->
document.md
## 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

contract.mdv.md
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->
context.json
{ "issues": [{ "number": 123, "state": "open" }] }
document.md
## Droid Bay Tracking

Fixes #123

✓ passes

A linked issue that is already closed is flagged

contract.mdv.md
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->
context.json
{ "issues": [{ "number": 123, "state": "closed" }] }
document.md
## Droid Bay Tracking

Fixes #123

✗ issue-wrong-state error · line 3

A run with no issue data could not check the document

contract.mdv.md
<!-- mdv: section issue.keyword=Fixes issue.state=open -->
## Droid Bay Tracking
<!-- mdv: endsection -->
document.md
## Droid Bay Tracking

Fixes #123

✗ missing-context error

See also: Gate PR bodies

On this page