#! /bin/bash # This script mocks forgehook for use by webhook endpoints, only for testing purposes # It returns a secret being simply the hashed URL of the repo [[ "$#" != 2 ]] && echo "WRONG ARGUMENTS ($#): $@" && exit 1 [[ "$1" != "secret" ]] && echo "UNIMPLEMENTED" && exit 2 echo -n "$2" | sha256sum | cut -d ' ' -f 1