deanishe / alfred-repos

Browse, search and open Git repositories in Alfred
Other
315 stars 23 forks source link

Doesn't update git repo automatically upon configuration #8

Closed aeroechelon closed 7 years ago

aeroechelon commented 8 years ago

Isn't clear in the README that you need to reposupdate for Alfred to pick this up. After I ran reposupdate it worked.

deanishe commented 8 years ago

reposupdate — Force workflow to update its cached list of repositories. (By default, the list will only be updated—in the background—every 3 hours.)

That's what it says in the README in the Usage section. How would you suggest I make that clearer?

aeroechelon commented 8 years ago

Sorry for the ambiguity in the first post – I had encountered this while installing and doing everything under configuration, no repos were still showing after I had followed the instructions.

As a user following the 'Configuration', I just doing everything there is all I needed to get this running. A suggestion to put the reposupdate as a last step in the Configuration would make installation complete – especially for those whose search returns empty upon first try!

deanishe commented 8 years ago

Understood. If you configure the workflow before running it, there won't be a cached list of repos, so it will be generated on first run. But that's a silly expectation on my part.

I've added a note to the Configuration section of the README saying to run reposupdate upon (re-)configuration.

Do you think that will be clear enough?

aeroechelon commented 8 years ago

I think the best solution would have repoupdate to run if the configuration has been modified since the last time it ran or something along similar lines. That way it would eliminate the need to run repoupdate and also eliminates this issue too ... though that would require extra work if at all possible.

The instructions in the configuration should be sufficient to prevent empty results for new users. :)

deanishe commented 8 years ago

Forgot to reply regarding your suggestion. The problem with checking the modtime of the settings file is that it uses Alfred-Workflow's settings API, and Alfred-Workflow (stupidly) also stores some of its own data in that file, so it's likely to trigger a lot of unnecessary updates, possibly on every run…

This is something I mean to fix in Alfred-Workflow, keeping its crap away from your workflow's stuff.

deanishe commented 7 years ago

Added in v2.1