Skip to content

Commit 700046d

Browse files
Fixes for pre-push hook to work locally
1 parent ca92325 commit 700046d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.git-hooks-matomo/pre-push

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ STATUS=0
6464

6565
### Run PHPStan on newly created files. ###
6666

67-
PHPSTAN_CREATED_CONFIG=phpstan/phpstan.created.neon
67+
PHPSTAN_CREATED_CONFIG=${MATOMO_DIR}/phpstan/phpstan.created.neon
6868
if [[ -f "$PHPSTAN_CREATED_CONFIG" ]]; then
6969
CHANGED_FILES=$(git diff --name-only 5.x-dev...HEAD --diff-filter=A | grep '\.php$' || true)
7070
if [ -z "$CHANGED_FILES" ]; then
7171
echo "No created PHP files"
7272
else
7373
echo "Running PHPstan at a very high level on new files"
74-
CHANGED_FILES=`echo "$CHANGED_FILES" | sed -e 's/^\(.*\)$/"\1"/' | xargs -I{} echo "${PLUGIN_PATH}/{}"`
75-
echo "$CHANGED_FILES" | xargs $COMMAND analyse -c ${PLUGIN_PATH}/${PHPSTAN_CREATED_CONFIG} || STATUS=1
74+
CHANGED_FILES=`echo "$CHANGED_FILES" | sed -e 's/^\(.*\)$/"\1"/' | xargs -I{} echo "${MATOMO_DIR}/${PLUGIN_PATH}/{}"`
75+
echo "$CHANGED_FILES" | xargs $COMMAND analyse -c ${MATOMO_DIR}/${PLUGIN_PATH}/${PHPSTAN_CREATED_CONFIG} || STATUS=1
7676
fi
7777
fi
7878

SlackApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function completeUploadExternal(string $channel, string $subject): bool
119119
[
120120
'token' => $this->token,
121121
'files' => json_encode([['id' => $this->fileID]]),
122-
'channels' => $channel,
122+
'channel_id' => $channel,
123123
'initial_comment' => $subject
124124
],
125125
['Content-Type' => 'multipart/form-data']

0 commit comments

Comments
 (0)