forked from forgejo/forgejo
Configurable close and reopen keywords for PRs (#8120)
* Add settings for CloseKeywords and ReopenKeywords * Fix and improve tests * Use sync.Once() for initialization * Fix unintended exported function
This commit is contained in:
parent
ac6accef09
commit
f9944c0e69
5 changed files with 199 additions and 77 deletions
|
@ -59,6 +59,8 @@ var (
|
|||
// Pull request settings
|
||||
PullRequest struct {
|
||||
WorkInProgressPrefixes []string
|
||||
CloseKeywords []string
|
||||
ReopenKeywords []string
|
||||
} `ini:"repository.pull-request"`
|
||||
|
||||
// Issue Setting
|
||||
|
@ -122,8 +124,14 @@ var (
|
|||
// Pull request settings
|
||||
PullRequest: struct {
|
||||
WorkInProgressPrefixes []string
|
||||
CloseKeywords []string
|
||||
ReopenKeywords []string
|
||||
}{
|
||||
WorkInProgressPrefixes: []string{"WIP:", "[WIP]"},
|
||||
// Same as GitHub. See
|
||||
// https://help.github.com/articles/closing-issues-via-commit-messages
|
||||
CloseKeywords: strings.Split("close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved", ","),
|
||||
ReopenKeywords: strings.Split("reopen,reopens,reopened", ","),
|
||||
},
|
||||
|
||||
// Issue settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue