Skip to content

Commit e141704

Browse files
committed
🐛 missing automatic quiet param in webhooks
🐛 progress button was not gray Signed-off-by: bnomei <[email protected]>
1 parent 2fcd792 commit e141704

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-janitor",
33
"type": "kirby-plugin",
4-
"version": "3.5.3",
4+
"version": "3.5.4",
55
"license": "MIT",
66
"homepage": "https://github.com/bnomei/kirby3-janitor",
77
"description": "Kirby 3 Plugin for running commands like cleaning the cache from within the Panel, PHP code or a cronjob",

index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@
150150
'action' => function (string $secret, string $command) {
151151
$janitor = \Bnomei\Janitor::singleton();
152152
if ($secret == $janitor->option('secret')) {
153-
return $janitor->command(urldecode($command));
153+
$command = urldecode($command);
154+
if (!Str::contains($command, ' --quiet')) {
155+
$command .= ' --quiet';
156+
}
157+
return $janitor->command($command);
154158
}
155159
return [
156160
'status' => 401,
@@ -163,7 +167,11 @@
163167
'action' => function (string $secret) {
164168
$janitor = \Bnomei\Janitor::singleton();
165169
if ($secret == $janitor->option('secret')) {
166-
return $janitor->command(get('command'));
170+
$command = get('command');
171+
if (!Str::contains($command, ' --quiet')) {
172+
$command .= ' --quiet';
173+
}
174+
return $janitor->command($command);
167175
}
168176
return [
169177
'status' => 401,

src/components/fields/Janitor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export default {
298298
}
299299
300300
.janitor.is-running {
301-
background-color: var(--color-border);
301+
background-color: var(--color-border) !important;
302302
color: white;
303303
cursor: wait;
304304
}

tests/site/blueprints/site.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ sections:
2525
help:
2626
de: 'DE Test help'
2727
en: 'EN Test help'
28+
janitor_webhookWithSecret:
29+
type: janitor
30+
command: 'janitor:pipe --data {{ kirby.urls.index }}/plugin-janitor/e9fe51f94eadabf54/whistle --to open'
31+

tests/site/config/config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
'debug' => true,
55
'languages' => true,
66

7+
'bnomei.janitor.secret' => 'e9fe51f94eadabf54',
8+
79
// janitor v2 job callback
810
'some.key.to.task' => function ($model, $data = null) {
911
return [

vendor/composer/installed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'bnomei/kirby3-janitor',
4-
'pretty_version' => '3.5.3',
5-
'version' => '3.5.3.0',
4+
'pretty_version' => '3.5.4',
5+
'version' => '3.5.4.0',
66
'reference' => NULL,
77
'type' => 'kirby-plugin',
88
'install_path' => __DIR__ . '/../../',
@@ -11,8 +11,8 @@
1111
),
1212
'versions' => array(
1313
'bnomei/kirby3-janitor' => array(
14-
'pretty_version' => '3.5.3',
15-
'version' => '3.5.3.0',
14+
'pretty_version' => '3.5.4',
15+
'version' => '3.5.4.0',
1616
'reference' => NULL,
1717
'type' => 'kirby-plugin',
1818
'install_path' => __DIR__ . '/../../',

0 commit comments

Comments
 (0)