pros-cli icon indicating copy to clipboard operation
pros-cli copied to clipboard

Template upgrade notifications

Open HotelCalifornia opened this issue 6 years ago • 3 comments

The CLI should notify the user when an upgrade for a template in a project becomes available. This should be debounced so the notifications don't appear too often.

HotelCalifornia avatar Sep 19 '19 22:09 HotelCalifornia

I think this function would do most of what is needed. https://github.com/purduesigbots/pros-cli/blob/b4437e8d592a31bac0d6b922f1788ff924b3cb77/pros/conductor/project/init.py#L92-L93

There's also a list of current templates. https://github.com/purduesigbots/pros-cli/blob/b4437e8d592a31bac0d6b922f1788ff924b3cb77/pros/conductor/interactive/UpdateProjectModal.py#L70

I would like to try to take this on but not quite sure how to get these things put together.

Sleuth56 avatar Apr 12 '20 03:04 Sleuth56

So, I'm thinking the logic would be more or less the same as the way we use Depot.last_remote_update and Depot.update_frequency:

https://github.com/purduesigbots/pros-cli/blob/80684a1d835a474f19bc417d4842f32b90a8b8ca/pros/conductor/depots/depot.py#L29-L37

the main difference being that we'd want this check to be specific to each project. The one part I haven't quite thought through yet is when to trigger a check for upgradable templates. Whenever the project is built maybe? @edjubuh maybe you want to chime in on that

HotelCalifornia avatar Apr 12 '20 03:04 HotelCalifornia

When the project gets built is what I was thinking as well. Right after the comment. https://github.com/purduesigbots/pros-cli/blob/b4437e8d592a31bac0d6b922f1788ff924b3cb77/pros/cli/build.py#L19-L27

Sleuth56 avatar Apr 12 '20 04:04 Sleuth56