-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Allow the next break or microbreak to be scheduled from the CLI #1092
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added some comments
Codecov Report
@@ Coverage Diff @@
## trunk #1092 +/- ##
==========================================
- Coverage 78.44% 78.33% -0.11%
==========================================
Files 14 14
Lines 334 337 +3
==========================================
+ Hits 262 264 +2
- Misses 72 73 +1
Continue to review full report at Codecov.
|
I've made the requested changes in a new commit. To avoid losing context, I didn't rebase or squash, but am happy to if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! I've tried locally and all seems fine :) Could you please update the CHANGELOG and squash?
`Command`: - Add new `--wait` option to commands `mini` and `long` - Add `waitToMs` method to utilise the existing interval parser, `parseDuration` `BreaksPlanner`: - Split `skipToMicrobreak` to add `scheduleMicrobreak` - Same for `skipToBreak`, `scheduleBreak` - Fix typos and inconsistencies in logged output
- breaksPlanner.js: remove separate `scheduleMicrobreak` and `scheduleBreak` functions - main.js: - Give `ms` variables more descriptive names - Remove default `delay` from `skipToMicrobreak` and `skipToBreak` - commands.js: add an example
I'm sorry I didn't get to this sooner. FOSS contribution time has been difficult to find over the last couple of weeks, but I was happy to do it. Thank you for merging. 🙏🏻 |
No worries :) I know the feeling, on the same boat here |
Issue: closes #1091
Requirements
node
version specified inpackage.json
was used (ie using nvm).npm install --no-save
).npm run lint
reports no offenses.npm run test
is error-free.Description of the Change
In the
Command
class:--wait
option to commandsmini
andlong
.waitToMs
method to utilise the existing interval parser (parseDuration
) frommain.js
when processing CLI options.BreaksPlanner
:Rename
skipToMicrobreak
toscheduleMicrobreak
and modify it slightly, adding a newskipToMicrobreak
function that simply callsscheduleMicrobreak(100)
Ditto for
skipToBreak
andscheduleBreak
Fix a few minor typos and inconsistencies in logged output.