Closed raamdev closed 9 years ago
That's a great idea. I was going to put a button in the Dashboard as a way to force the GitHub Processor to run, but that seems prone to issues, since a single CRON process may not get everything. It may need to be run multiple times; i.e. it can be confusing to try to explain this to others.
The idea of forcing a refresh of a particular article sounds perfect though.
Marking this as ready for work.
@jaswsinc writes...
I'd like to hold off on this until we complete work on the GitHub API Recursion (https://github.com/websharks/wp-kb-articles/issues/12). Only because the API is going to change, and I would need to refactor anything I do on that feature anyway. So waiting until after the API is updated to deal with recursion more reliably would be a good move in my view.
@jaswsinc Woohoo! You're on a roll with this plugin. :-)
Yeah, love working on this.
@jaswsinc Awesome! I would tweak that Dashboard notification as follows:
KB Article ID:
1268
has been synced with GitHub.
I think clicking any button that says "Sync w/ GitHub" makes it clear enough what's happening that you don't need to say "has been updated to what exists on the GitHub side".
Also, we may want to add a "[?]" to the end of that Dashboard message that links to a KB Article that explains what happens when a KB Article is synced with GitHub.
Let me know if you'd like me to open a separate issue for updating the Dashboard notification.
Good idea. I think it's important to clarify this also, because a "sync" can go both ways. We know what's happening here, but someone else might wonder if data from WordPress is being pushed to GitHub.
I'll reopen this and come back to it once we have a KB article.
Updating story points to 5
for remaining work.
I updated the wording as suggested. I'll leave this open for a KB article to come soon.
I updated the wording as suggested.
Thanks!
I'll leave this open for a KB article to come soon.
Publishing the KB Article will depend on getting the WP KB Articles website up and running (so we have a live link to link to--in fact, we could just link to a redirect on the WP KB Articles website), so this issue is currently blocked by getting the website up and running.
I see this is ready to work on again. Unblocking.
I've created a KB Article draft: What happens when a KB Article is synced with GitHub?
I've also created a Redirect on wpkbarticles.com that we can use inside the plugin dashboard message: http://wpkbarticles.com/r/what-happens-when-kb-article-is-synced-with-github/
(edit)
The redirect will need to be updated once the KB Article gets published, but for now we can go ahead and update the Dashboard messages inside the plugin to reference that KB Article. Once that's done, we can close this GitHub issue.
Done. Thanks!
Not a priority of any type, but logging this idea here as a possible future enhancement.
It might be nice to have a button next to each KB Article in the articles list (when GitHub Integration is enabled) that allows you to tell the plugin to force a refresh of that particular KB Article by fetching the associated Markdown file and reimporting it.
I realize that any changed files will be automatically updated the next time the GitHub Processor runs, but it would be convenient from a site-owner's perspective to not have to wait for that update (assuming we don't expose an endpoint that allows initiating the GitHub Processor immediately; even then, a site owner might just like the idea of being able to refresh a single article after changing it on GitHub).
This would also be useful if we allow, at some point in the future, controlling the interval that the GitHub Processor runs. If a site owner chooses to have it run only once an hour, or once a day, having a button to refresh a single article becomes more valuable.