-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
No information is given on stdin for pre/post-receive #1957
Comments
I've noted the same issue when I migrated from my 0.9 Gogs install to Gitea. #!/usr/bin/env bash
ORI_DIR=`pwd`
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
cd "$ORI_DIR"
for i in `ls "$SHELL_FOLDER/post-receive.d"`; do
sh "$SHELL_FOLDER/post-receive.d/$i"
done Your actual hook is in Something like that would make your pre/post-receive work again: #!/usr/bin/env bash
ORI_DIR=`pwd`
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
read STDIN
cd "$ORI_DIR"
for i in `ls "$SHELL_FOLDER/post-receive.d"`; do
echo "$STDIN" | sh "$SHELL_FOLDER/post-receive.d/$i"
done I'll see if I can make a PR for that. |
We need also some integration tests about hooks. |
Also #1257 was backported to 1.1.x version but not migration. You should manually run |
[x]
):Description
pre-receive and post-receive git hooks are supposed to receive information on
stdin
related #1808
The text was updated successfully, but these errors were encountered: