mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Close/reopen issues by keywords in titles and comments (#8866)
* Add close/reopen from comment functionality * Fix comment * Rewrite closing/reopening template * Check xref permissions, move action to services/pull * Fix RefIsPull field * Add xref tests * Fix xref unique filter * Only highlight keywords for actionable xrefs * Fix xref neuter filter * Fix check return status * Restart CI
This commit is contained in:
@@ -350,3 +350,8 @@ func findActionKeywords(content []byte, start int) (XRefAction, *RefSpan) {
|
||||
}
|
||||
return XRefActionNone, nil
|
||||
}
|
||||
|
||||
// IsXrefActionable returns true if the xref action is actionable (i.e. produces a result when resolved)
|
||||
func IsXrefActionable(a XRefAction) bool {
|
||||
return a == XRefActionCloses || a == XRefActionReopens
|
||||
}
|
||||
|
Reference in New Issue
Block a user