agrc / create-reminder-action

A GitHub Action for setting reminders in issues
MIT License
11 stars 8 forks source link

Hour-level granularity does not work #177

Open StilesCrisis opened 10 months ago

StilesCrisis commented 10 months ago

The docs aren't clear on time window granularity, they only give examples:

Use any form of /remind me [what] [when], such as:

  • /remind me to deploy on Oct 10
  • /remind me next Monday to review the requirements
  • /remind me that the specs on the rotary girder need checked in 6 months

I did not notice that these are actually all day-level granularity. When I was testing my installation, I did

/remind me to set due date in 4 hours

This generated a reminder only a few minutes later:

Screenshot 2023-08-31 at 2 28 25 PM

NOTE: this could be considered either a documentation bug or a feature request—your call.

stdavis commented 10 months ago

Great catch. I don't believe that we've ever tried this at more than a day-level granularity. Are you interested in submitting a PR to make this enhancement?

StilesCrisis commented 10 months ago

I was barely able to install the action—I'm not quite at the level of adding features quite yet! Sorry.

steveoh commented 9 months ago

https://www.npmjs.com/package/parse-reminder is the package we use to parse natural language reminders into who, what, and when. They have an example of:

remind me in 10 minutes to change the laundry

So your 4 hour request is actually working.

> var parseReminder=require('parse-reminder')
> parseReminder('remind me set a due date in 4 hours')
{ who: 'me', what: 'set a due date', when: 2023-10-04T15:14:54.000Z }

We are using toLocaleDateString to format the date in the comments which doesn't show the time.

Your reminder should work, as long as you have your reminder action running on an hourly frequency it will remind you.

So this is probably a formatting "bug". But since the time at which you will be notified is based on the frequency of your reminder action, it will not always be accurate to show the time. So I'm inclined to leave it as is.

Thoughts?

StilesCrisis commented 9 months ago

In my experience, it did not wait 4 hours. It triggered almost immediately. So I think there's probably still a real bug in there somewhere.

On Wed, Oct 4, 2023 at 8:17 PM steveoh @.***> wrote:

https://www.npmjs.com/package/parse-reminder is the package we use to parse natural language reminders into who, what, and when. They have an example of:

remind me in 10 minutes to change the laundry

So your 4 hour request is actually working.

var parseReminder=require('parse-reminder')> parseReminder('remind me set a due date in 4 hours'){ who: 'me', what: 'set a due date', when: 2023-10-04T15:14:54.000Z }

We are using toLocaleDateString https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString to format the date in the comments which doesn't show the time.

Your reminder should work, as long as you have your reminder action https://github.com/agrc/reminder-action running on an hourly frequency it will remind you.

So this is probably a formatting "bug". But since the time at which you will be notified is based on the frequency of your reminder action, it will not always be accurate to show the time. So I'm inclined to leave it as is.

Thoughts?

— Reply to this email directly, view it on GitHub https://github.com/agrc/create-reminder-action/issues/177#issuecomment-1747828101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCLRPIVJVWIDSU2UB7UOF3X5X4B3AVCNFSM6AAAAAA4GPHWJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXHAZDQMJQGE . You are receiving this because you authored the thread.Message ID: @.***>

steveoh commented 9 months ago

You're probably right. The next place to look would be the hidden comment format. We may strip the time there also.

nessita commented 5 months ago

I think I'm affected by this issue as well. I was trying to use a 15 minute granularity for the reminders, and to test it, I defined a reminder like this:

/remind me to check on this in 20 minutes

When the create reminder action ran, this was the debug payload:

2024-02-13T19:41:16.8330145Z {
2024-02-13T19:41:16.8330766Z  "who": "nessita",
2024-02-13T19:41:16.8332664Z  "what": "check on this",
2024-02-13T19:41:16.8333555Z  "when": "2024-02-13T09:01:16.000Z"
2024-02-13T19:41:16.8334175Z }

The when value is correct and accurate, but the reminder was posted only after 4 minutes (that is the next time the "check reminders" action ran).