mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-28 16:47:01 +09: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:
1 parent
08ae6bb7ed
commit
b15f26b1cf
7 files changed
+300
-46
No files matched your search
@@ -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