Skip to content

post_receive: accept any user email from last commit

Elan Ruusamäe requested to merge glensc/gitlab-ce:post_receive-any-email into master

What does this MR do?

Accepts any user email, not just primary from post_receive if hook is invoked without key-123 or user-123 identifier.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

I'm integrating legacy system with gitlab doing incremental move to GitLab and it's difficult to map authorized request to key-123 or user-123, as there already existed code path to lookup user from last commit, improved to look also into user aliases.

https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.13.2/lib/gitlab/identifier.rb#L18-19

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports