fixed hook parameter order
parent
12fecb0dc9
commit
ce254e4e47
|
|
@ -11,8 +11,8 @@ fi
|
||||||
# Echo parameters
|
# Echo parameters
|
||||||
echo "Webhook recieved for repository: $repository_name and branch: $branch_name"
|
echo "Webhook recieved for repository: $repository_name and branch: $branch_name"
|
||||||
|
|
||||||
repository_name="$2"
|
repository_name="$1"
|
||||||
branch_name=$(basename "$1")
|
branch_name=$(basename "$2")
|
||||||
|
|
||||||
if [ "$branch_name" != "main" ]; then
|
if [ "$branch_name" != "main" ]; then
|
||||||
echo "Error: This hook must only update branch main, not $branch_name"
|
echo "Error: This hook must only update branch main, not $branch_name"
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "payload",
|
||||||
"name": "ref"
|
"name": "repository.name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "payload",
|
||||||
"name": "repository.name"
|
"name": "ref"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"trigger-rule":
|
"trigger-rule":
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ if [ "$#" -ne 2 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
repository_name="$2"
|
repository_name="$1"
|
||||||
branch_name=$(basename "$1")
|
branch_name=$(basename "$2")
|
||||||
|
|
||||||
BRANCHES_FOLDER="/html/branches"
|
BRANCHES_FOLDER="/html/branches"
|
||||||
PROGRAMM_REPOSITORY="git_programm:AG-Programm/parteiprogramm.git"
|
PROGRAMM_REPOSITORY="git_programm:AG-Programm/parteiprogramm.git"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue