forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tasks
executable file
·36 lines (28 loc) · 870 Bytes
/
.tasks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# Tasks file
# This file produces the possible set of bot tasks to be executed in the
# current repository by bots. Empty lines and commented lines are ignored
# and commented lines are removed. If this file is executable it will be
# run, and the output will be used as the list of tasks.
# The tasks are sorted descending alphabetically and a task is chosen from
# near the top of the sorted result. The task will be run in a shell by the
# Cockpit bots.
set -ex
# Scan for all tests
bots/tests-scan
# When run automated, randomize to minimize stampeding herd
if [ -t 0 ]; then
chance=10
else
chance=$(shuf -i 0-10 -n 1)
fi
# File issues for these tasks
if [ $chance -gt 9 ]; then
bots/po-trigger
bots/image-trigger
bots/npm-trigger
bots/naughty-trigger
bots/learn-trigger
fi
# Any tasks related to issues
bots/issue-scan