New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) #5944

Merged
merged 1 commit into from Feb 3, 2019

Conversation

4 participants
@zeripath
Copy link
Contributor

zeripath commented Feb 3, 2019

Backport of #5935

The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795

Signed-off-by: Andrew Thornton art27@cantab.net

Fix notifications on pushing with deploy keys by setting hook environ…
…ment variables (#5935)

The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795 

Signed-off-by: Andrew Thornton art27@cantab.net

@zeripath zeripath added the kind/bug label Feb 3, 2019

@zeripath zeripath added this to the 1.7.2 milestone Feb 3, 2019

@GiteaBot GiteaBot added the lgtm/need 1 label Feb 3, 2019

@adelowo

adelowo approved these changes Feb 3, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Feb 3, 2019

@techknowlogick techknowlogick merged commit 7312752 into go-gitea:release/v1.7 Feb 3, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr the build was successful
Details

@zeripath zeripath deleted the zeripath:backport-5935 branch Feb 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment