Skip to content
代码片段 群组 项目
未验证 提交 eaa27e72 编辑于 作者: Kerri Miller's avatar Kerri Miller 提交者: GitLab
浏览文件

Merge branch 'slashmanov/revoke-to-reset-approvals' into 'master'

Change revoked approvals to reset approvals

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143274



Merged-by: default avatarKerri Miller <kerrizor@kerrizor.com>
Approved-by: default avatarAmy Qualls <aqualls@gitlab.com>
Approved-by: default avatarKerri Miller <kerrizor@kerrizor.com>
Co-authored-by: default avatarStanislav Lashmanov <slashmanov@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -13,7 +13,7 @@ def merge_when_checks_pass(sha) ...@@ -13,7 +13,7 @@ def merge_when_checks_pass(sha)
# #
# Example Note text: # Example Note text:
# #
# "revoked approvals from @user3, @user4, and @user5 by pushing to the branch" # "reset approvals from @user3, @user4, and @user5 by pushing to the branch"
# #
# Returns the created Note object # Returns the created Note object
def approvals_reset(cause, approvers) def approvals_reset(cause, approvers)
...@@ -21,7 +21,7 @@ def approvals_reset(cause, approvers) ...@@ -21,7 +21,7 @@ def approvals_reset(cause, approvers)
return unless cause == :new_push return unless cause == :new_push
return if approvers.empty? return if approvers.empty?
body = "revoked approvals from #{approvers.map(&:to_reference).to_sentence} by pushing to the branch" body = "reset approvals from #{approvers.map(&:to_reference).to_sentence} by pushing to the branch"
create_note(NoteSummary.new(noteable, project, author, body, action: 'approvals_reset')) create_note(NoteSummary.new(noteable, project, author, body, action: 'approvals_reset'))
end end
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
it 'sets the note text' do it 'sets the note text' do
expect(approvals_reset_note.note) expect(approvals_reset_note.note)
.to eq("revoked approvals from #{approvers.map(&:to_reference).to_sentence} by pushing to the branch") .to eq("reset approvals from #{approvers.map(&:to_reference).to_sentence} by pushing to the branch")
end end
context 'when cause is not new_push' do context 'when cause is not new_push' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册