BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1a45de3d
Commit
1a45de3d
authored
Nov 23, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'post_receive-any-email' into 'master'
post_receive: accept any user email from last commit See merge request !7225
parents
ba0d4877
b9176afb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
post_receive-any-email.yml
changelogs/unreleased/post_receive-any-email.yml
+4
-0
identifier.rb
lib/gitlab/identifier.rb
+1
-1
identifier_spec.rb
spec/lib/gitlab/identifier_spec.rb
+1
-1
No files found.
changelogs/unreleased/post_receive-any-email.yml
0 → 100644
View file @
1a45de3d
---
title
:
"
post_receive:
accept
any
user
email
from
last
commit"
merge_request
:
7225
author
:
Elan Ruusamäe
lib/gitlab/identifier.rb
View file @
1a45de3d
...
...
@@ -24,7 +24,7 @@ module Gitlab
email
=
commit
.
author_email
identify_with_cache
(
:email
,
email
)
do
User
.
find_by
(
email:
email
)
User
.
find_by
_any_email
(
email
)
end
end
...
...
spec/lib/gitlab/identifier_spec.rb
View file @
1a45de3d
...
...
@@ -65,7 +65,7 @@ describe Gitlab::Identifier do
commit
=
double
(
:commit
,
author_email:
user
.
email
)
expect
(
project
).
to
receive
(
:commit
).
with
(
'123'
).
twice
.
and_return
(
commit
)
expect
(
User
).
to
receive
(
:find_by
).
once
.
and_call_original
expect
(
User
).
to
receive
(
:find_by
_any_email
).
once
.
and_call_original
2
.
times
do
expect
(
identifier
.
identify_using_commit
(
project
,
'123'
)).
to
eq
(
user
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment