aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--custom/conf/app.example.ini2
-rw-r--r--docs/content/doc/advanced/config-cheat-sheet.en-us.md2
-rw-r--r--models/pull.go4
3 files changed, 4 insertions, 4 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 8d7946145f..b33e156646 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -880,7 +880,7 @@ PATH =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; List of prefixes used in Pull Request title to mark them as Work In Progress
+;; List of prefixes used in Pull Request title to mark them as Work In Progress (matched in a case-insensitive manner)
;WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]
;;
;; List of keywords used in Pull Request comments to automatically close a related issue
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
index c4fbe3867f..94dd432304 100644
--- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md
+++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
@@ -87,7 +87,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
### Repository - Pull Request (`repository.pull-request`)
- `WORK_IN_PROGRESS_PREFIXES`: **WIP:,\[WIP\]**: List of prefixes used in Pull Request
- title to mark them as Work In Progress
+ title to mark them as Work In Progress. These are matched in a case-insensitive manner.
- `CLOSE_KEYWORDS`: **close**, **closes**, **closed**, **fix**, **fixes**, **fixed**, **resolve**, **resolves**, **resolved**: List of
keywords used in Pull Request comments to automatically close a related issue
- `REOPEN_KEYWORDS`: **reopen**, **reopens**, **reopened**: List of keywords used in Pull Request comments to automatically reopen
diff --git a/models/pull.go b/models/pull.go
index 4b2b07cdef..cc25165ef7 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -622,7 +622,7 @@ func (pr *PullRequest) IsWorkInProgress() bool {
// HasWorkInProgressPrefix determines if the given PR title has a Work In Progress prefix
func HasWorkInProgressPrefix(title string) bool {
for _, prefix := range setting.Repository.PullRequest.WorkInProgressPrefixes {
- if strings.HasPrefix(strings.ToUpper(title), prefix) {
+ if strings.HasPrefix(strings.ToUpper(title), strings.ToUpper(prefix)) {
return true
}
}
@@ -643,7 +643,7 @@ func (pr *PullRequest) GetWorkInProgressPrefix() string {
}
for _, prefix := range setting.Repository.PullRequest.WorkInProgressPrefixes {
- if strings.HasPrefix(strings.ToUpper(pr.Issue.Title), prefix) {
+ if strings.HasPrefix(strings.ToUpper(pr.Issue.Title), strings.ToUpper(prefix)) {
return pr.Issue.Title[0:len(prefix)]
}
}