Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HUBOT_STANDUP_WEEKDAYS work #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/standup.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ module.exports = (robot) ->
PREPEND_MESSAGE += ' '

# Check for standups that need to be fired, once a minute
# Monday to Friday.
new cronJob('1 * * * * 1-5', checkStandups, null, true)
# Defaults to Monday to Friday.
WEEKDAYS_CRON = process.env.HUBOT_STANDUP_WEEKDAYS or '1-5'
new cronJob('1 * * * * '+ WEEKDAYS_CRON, checkStandups, null, true)

# Global regex should match all possible options
robot.respond /(.*?)standups? ?(?:([A-z]*)\s?\@\s?)?((?:[01]?[0-9]|2[0-4]):[0-5]?[0-9])?(?: UTC([- +]\d\d?))?(.*)/i, (msg) ->
Expand Down