Notify new releases only once per day#2488
Conversation
|
As mentioned in #2485, I guess instead of hard-coding 24 hours(1 day), we could store a config key inside the |
|
@shrihanDev |
|
@cristiand391 Sorry for not being clear at first, but actually I meant that instead of 24 hours, we could let the user decide the interval. The user could set a config key that stores the time interval, and then Sorry if I miss something again 😢 |
|
@shrihanDev no need to apologize, sorry if I sounded rude 😅. I can't see how a user would benefit from customizing it, but if more users ask for it then maybe the cli team will consider adding it. |
|
@cristiand391 No probs! Let's wait for more votes to this customisation. |
|
The one logical customization I can see is being able to disable the update checks in the config file, not just via env vars. I agree w/ @cristiand391 there doesn't seem to be much value in fine tuning the frequency of update checks as a user. Otherwise I was about to put up a PR doing the same thing as this one based on @mislav's helpful pointer in #2485, when I saw this one was already here :) |
|
So stupid of me! I was thinking that this PR adds the functionality to check for release builds in each repository, and notify once a day 🤦🏻♂️ Extremely sorry. |
|
Now that I know what's going on, I guess it's pointless to customise the frequency of the new-release-checking. |
|
Thank you for your contribution! I've pushed a commit to simplify things. I wanted reduce the responsibilities of |
f4b8254 to
3ee3d61
Compare
mislav
left a comment
There was a problem hiding this comment.
Looks great! Thank you both 🚀
3ee3d61 to
2843fff
Compare
Fix #2485
I've tested this locally with hardcoded values and works as expected.
ghwill only notice a new release after the network check.If
state.ymldoesn't exists(new users),CheckForUpdate()will continue in order to create the file.