#2700 Make the pagure hook act as the person doing the push
Merged by pingou. Opened by pingou.
pagure_hook_user  into  master

Download 2700.patch

This was a small annoyance we had, if you were amending a commit from
someone else, or just rewording the commit message (for example to add
the Merges... line) and pushing to the main repo, pagure would show
the action has being done by the author of the commit rather than the
person who pushed that commit.

This commit fixes this by relying on the environment variable set by
gitolite if it is present, else going back to the author of the commit
if we cannot know who pushed.

Fixes https://pagure.io/pagure/issue/2597

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

1 new commit added

  • Add a small debugging statement

I wonder whether this would make a good function since it's used twice in this patch.

I recommend tests, but LGTM otherwise.

For the moment it's pretty straight forward so I'll keep this here but if it's needed in more places it may make sense to move it to a function indeed.

Hooks themselves don't really have tests but the individual functions they use are tested.

Thanks for the review! :)

Pull-Request has been merged by pingou

Metadata