summaryrefslogtreecommitdiffstats
path: root/integrations/gitea-integration-meta
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-07-26 23:12:56 -0700
committerLunny Xiao <xiaolunwen@gmail.com>2017-07-27 14:12:56 +0800
commitaff11bc65e09bfe607d574cb60888a54cff75456 (patch)
tree7ceb66f29a28d245fb24ada13251bc871d2c5605 /integrations/gitea-integration-meta
parenta27863b6d15026cf36b164707331fd59ffb68931 (diff)
downloadgitea-aff11bc65e09bfe607d574cb60888a54cff75456.tar.gz
gitea-aff11bc65e09bfe607d574cb60888a54cff75456.zip
Fix hooks for integration repo (#2216)
Diffstat (limited to 'integrations/gitea-integration-meta')
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive7
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea2
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample6
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive7
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea2
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update7
-rwxr-xr-xintegrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea2
7 files changed, 30 insertions, 3 deletions
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive
new file mode 100755
index 0000000000..4b3d452abc
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive
@@ -0,0 +1,7 @@
+#!/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 \ No newline at end of file
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea
new file mode 100755
index 0000000000..2eb3be9836
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample
index 9773ed4cb2..33730ca647 100755
--- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample
@@ -88,9 +88,7 @@ else
exit 1
fi
-exit 0
-
-################################################################
+<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
@@ -167,3 +165,5 @@ To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
+
+DOC_END
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive
new file mode 100755
index 0000000000..4127013053
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+ORI_DIR=`pwd`
+SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
+cd "$ORI_DIR"
+for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do
+ sh "$SHELL_FOLDER/pre-receive.d/$i"
+done \ No newline at end of file
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea
new file mode 100755
index 0000000000..1933f6cff0
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update
new file mode 100755
index 0000000000..c186fe4a18
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+ORI_DIR=`pwd`
+SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
+cd "$ORI_DIR"
+for i in `ls "$SHELL_FOLDER/update.d"`; do
+ sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3
+done \ No newline at end of file
diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea
new file mode 100755
index 0000000000..615b4f4b82
--- /dev/null
+++ b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3