mozilla / testdaybot

Mozilla QA Test Day IRC Bot
9 stars 12 forks source link

Make time errors more explicit when setting the ":next" Testday #77

Closed xabolcs closed 9 years ago

xabolcs commented 9 years ago

Fix for #74.

xabolcs commented 9 years ago

Example talk with my testdaybot named xabolcs_tdb:

[23:46:38]  xabolcs :next
[23:46:39]  xabolcs_tdb Need some help? :next <start as YYYY-MM-DDThh:mmZ> <end as YYYY-MM-DDThh:mmZ> <etherpad> <topic>: set next Test Day
[23:49:41]  xabolcs :next 2014-12-13T23:30Z 2013-12-13T23:45Z etherpad topic
[23:49:41]  xabolcs_tdb Please use valid dates.
[23:49:41]  xabolcs_tdb Start time was set after End time.
[23:50:09]  xabolcs :next 2014-12-13T23:30Z 2014-12-13T23:45Z etherpad topic
[23:50:10]  xabolcs_tdb Please use valid dates.
[23:50:10]  xabolcs_tdb Start time is set in the past.
[23:50:29]  xabolcs :next 2015-12-13T23:30Z 2014-12-13T23:45Z etherpad topic
[23:50:30]  xabolcs_tdb Please use valid dates.
[23:50:30]  xabolcs_tdb Start time was set after End time.
[23:50:35]  xabolcs :next 2015-12-13T23:30Z 2015-12-13T23:45Z etherpad topic
[23:50:36]  xabolcs_tdb Next Test Day's start is Sun, 13 Dec 2015 23:30:00 GMT
[23:50:36]  xabolcs_tdb Next Test Day's end is Sun, 13 Dec 2015 23:45:00 GMT
[23:50:36]  xabolcs_tdb Next Test Day's etherpad is etherpad
[23:50:36]  xabolcs_tdb Next Test Day's topic is topic
xabolcs commented 9 years ago

Interestingly there was a message in the channel after setting up a test day. Was it expected?

[23:50:36]  xabolcs_tdb The topic testday starts now. For details, see etherpad
xabolcs commented 9 years ago

This is ready to review!

xabolcs commented 9 years ago

Pushed commits to PR's branch including 45f4fc910c69f42ac23a289c0a6a587e7fe061dc. Ready to review.

Please see the following conversation!


URL     ircs://moznet/xabolcs_tdb,isnick    Connected via   fripp.mozilla.org
Conversation with xabolcs_tdb <nodebot@moz-fci6nk.catv.broadband.hu>
nodeJS IRC client
xabolcs_tdb
[13:54:06]  [INFO]  Messages Cleared.
[13:54:11]  xabolcs :next
[13:54:12]  xabolcs_tdb Need some help? :next <start as YYYY-MM-DDThh:mmZ> <end as YYYY-MM-DDThh:mmZ> <etherpad> <topic>: set next Test Day
[13:55:46]  xabolcs :next 2014-03-04T11:00Z 2014-03-04T11:30Z https://etherpad.location.url TestDayBot Test Day
[13:55:46]  xabolcs_tdb Please use valid dates: start time is set in the past.
[13:56:01]  xabolcs :next 2014-03-04T11:00Z 2014-03-04T10:30Z https://etherpad.location.url TestDayBot Test Day
[13:56:02]  xabolcs_tdb Please use valid dates: start time is set after End time, start time is set in the past.
[13:56:24]  xabolcs :next 2015-03-04T11:00Z 2014-03-04T10:30Z https://etherpad.location.url TestDayBot Test Day
[13:56:24]  xabolcs_tdb Please use valid dates: start time is set after End time.
[13:56:43]  xabolcs :next 2015-03-04T11:00Z 2015-03-04T11:30Z https://etherpad.location.url TestDayBot Test Day
[13:56:43]  xabolcs_tdb Next Test Day's start is Wed, 04 Mar 2015 11:00:00 GMT
[13:56:43]  xabolcs_tdb Next Test Day's end is Wed, 04 Mar 2015 11:30:00 GMT
[13:56:43]  xabolcs_tdb Next Test Day's etherpad is https://etherpad.location.url
[13:56:43]  xabolcs_tdb Next Test Day's topic is TestDayBot Test Day
xabolcs commented 9 years ago

This is ready to review!

xabolcs commented 9 years ago

This is ready to review up to commit b14a8a01ac9f1ec0e277fd3f35728c542fa906f6.

whimboo commented 9 years ago

This looks fine! I got it merged as https://github.com/mozilla/testdaybot/commit/5a749f976b3a0b79e920d0bc5bdde439f4b37f0a. Thanks for your contribution.