fixed hook parameter order

main
Andre Challier 2024-03-28 09:42:35 +01:00
parent 12fecb0dc9
commit ce254e4e47
3 changed files with 6 additions and 6 deletions

View File

@ -11,8 +11,8 @@ fi
# Echo parameters
echo "Webhook recieved for repository: $repository_name and branch: $branch_name"
repository_name="$2"
branch_name=$(basename "$1")
repository_name="$1"
branch_name=$(basename "$2")
if [ "$branch_name" != "main" ]; then
echo "Error: This hook must only update branch main, not $branch_name"

View File

@ -16,11 +16,11 @@
[
{
"source": "payload",
"name": "ref"
"name": "repository.name"
},
{
"source": "payload",
"name": "repository.name"
"name": "ref"
}
],
"trigger-rule":

View File

@ -6,8 +6,8 @@ if [ "$#" -ne 2 ]; then
exit 1
fi
repository_name="$2"
branch_name=$(basename "$1")
repository_name="$1"
branch_name=$(basename "$2")
BRANCHES_FOLDER="/html/branches"
PROGRAMM_REPOSITORY="git_programm:AG-Programm/parteiprogramm.git"