Fixes https://pagure.io/pagure/issue/901 + Create symlink for post/pre-receive script and add x permission in git.
I wonder if we should log which repo was not found, to help admins debug this
My first idea was to use self. variables, but this is cool as well :)
self.
ok this won't fly, we need something more flexible than a relying on a list that we'll forget to update when adding a hook.
Relying on the hook_type here might be the solution
hook_type
Same as below, we need to be more flexible than a list
Few comments but this looks neat :)
we could just pass the full hook_name in arg, ie pre-receive.pagureforcecommit instead of pagureforcecommit
pre-receive.pagureforcecommit
pagureforcecommit
What do you think ?
That should work.
I wonder if we couldn't rely a little more on the fact that we use inheritance, but otherwise it should work :)
rebased
Fixes #901
Better yet, use APP.logger then it's the same logger as for the rest of the app
APP.logger
the call to the logger must be before the abort, otherwise we won't run it
If the hook_type is no longer used, then we could drop it while at it :)
1 new commit added
hook_type is used by the BaseHook set_up method so we need it
set_up
idea (open for discussion) what if we raised an exception here? This would allow us to keep this part independent of any web-framework.
What do you think?
Now using hook_type + exception for git repo not found
We should be able to drop this now :)
These two lines should still be true
If fear this will never fail :)
11 new commits added
So I guess this is no longer needed :)
We should remove the # pragma: no cover now since, we now run this method and therefore it can be taken into account when checking coverage
# pragma: no cover
cf above :)
Thanks :)
Pull-Request has been merged by pingou
Fixes https://pagure.io/pagure/issue/901 + Create symlink for post/pre-receive script and add x permission in git.