Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Support all valid cron strings #3

Open
hectorsector opened this issue Feb 22, 2021 · 6 comments
Open

Support all valid cron strings #3

hectorsector opened this issue Feb 22, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@hectorsector
Copy link
Member

Per feedback from an early tester:

My weekly failed with the following error: Warning: Expected stale-weekly to contain the cron syntax 0 0 * * MON, got 0 0 * * 1. However, my syntax IS correct, I just chose to use the number not the name for the day of the week. It should not have failed.

We should support all valid answers, even if they're not what we expected. Perhaps there's a cron library we can use to validate the equivalency of two cron strings?

/cc @mattdavis0351

@hectorsector hectorsector added the bug Something isn't working label Feb 22, 2021
@mattdavis0351 mattdavis0351 self-assigned this Feb 26, 2021
@mattdavis0351
Copy link
Contributor

I think we can easily fix this without a library! I'll take this one 😄

@mattdavis0351
Copy link
Contributor

@hectorsector want to close this out now that the above pr has 🚢 ?

@hectorsector
Copy link
Member Author

If we want to leave the instructions as-is:

On your repository, edit the on: key of the stale-weekly.yml workflow so that it contains a trigger to run every Monday.

Then we'll need to support variations that all run weekly on a Monday. We can scope it down to a specific time on Monday so that the PR works, but as it stands if someone wants to input, say, at 3pm on a Monday their workflow will fail although still meeting the criteria @mattdavis0351

@mattdavis0351
Copy link
Contributor

mattdavis0351 commented Mar 2, 2021

So for that we will need to scope exactly how we want it and update the action accordingly. Let's leave this open until we get to that point

@mattdavis0351
Copy link
Contributor

@hectorsector I'm pretty certain we have addressed this. Should we close this issue?

@hectorsector
Copy link
Member Author

I think this use case still wouldn't be addressed right @mattdavis0351 ?

if someone wants to input, say, at 3pm on a Monday their workflow will fail although still meeting the criteria

I can try and take a stab at it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants