cockpit/.tasks

29 lines
737 B
Bash
Executable File

#!/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
# 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/npm-trigger
bots/learn-trigger
fi