tasks: Minimize races filing issues for bots

We don't need to file or check for these issues on every iteration
through the .tasks script. These will count as "work done" and thus skip
the sleep (even though the "work" lasts only a split-second), and are
prone to creating duplicates.

Similar to af2e934a

Closes #147
This commit is contained in:
Martin Pitt 2019-03-04 09:11:29 +01:00 committed by Martin Pitt
parent 32f0e20ddb
commit afda681f4a

13
.tasks
View file

@ -1,7 +1,16 @@
#!/bin/sh
# Open issues for things that need doing on a regular basis
bots/npm-trigger
# When run automated, randomize to minimize stampeding herd
if [ -t 0 ]; then
chance=10
else
chance=$(shuf -i 0-10 -n 1)
fi
if [ $chance -gt 9 ]; then
# Open issues for things that need doing on a regular basis
bots/npm-trigger
fi
# Find those issues and propose to do them
bots/issue-scan