Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 14:10:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 14:10:13 +0300
commit0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch)
tree7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/models/commit.rb
parent72123183a20411a36d607d70b12d57c484394c8e (diff)
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 5293bfcf1ab..ca18cb50e02 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -513,11 +513,16 @@ class Commit
# We don't want to do anything for `Commit` model, so this is empty.
end
+ # We are continuing to support `(fixup!|squash!)` here as it is the prefix
+ # added by `git commit --fixup` which is used by some community members.
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/342937#note_892065311
+ #
DRAFT_REGEX = /\A\s*#{Gitlab::Regex.merge_request_draft}|(fixup!|squash!)\s/.freeze
- def work_in_progress?
+ def draft?
!!(title =~ DRAFT_REGEX)
end
+ alias_method :work_in_progress?, :draft?
def merged_merge_request?(user)
!!merged_merge_request(user)