wpsharks / wp-kb-articles-kb

KB repo for the WP KB Articles plugin.
0 stars 0 forks source link

What happens to the Status of a Published KB Article when an associated Markdown file on GitHub is updated? #3

Open raamdev opened 9 years ago

raamdev commented 9 years ago

KB Article Creation Checklist
title: What happens to the Status of a Published KB Article when an associated Markdown file on GitHub is updated?
categories: questions
tags: 
author: raamdev
github-issue: https://github.com/websharks/wp-kb-articles-kb/issues/3

Question: When a Markdown file is updated for a KB Article that has been set to Published in WordPress, what happens to the state of the KB Article on the WordPress side when the plugin detects and imports the changed Markdown file in the GitHub Repo? Does the KB Article get updated and remain Published, or does it go back to the Pending state?

Answer: The live KB Article is updated and remains Published, unless the updated Markdown file also included a YAML status: key set to something else (such as status: pending or status: draft).

What if I want to restrict who has permission to update Published KB Article?

If you want to restrict this, you could simply require that people submit Pull Requests to the KB GitHub Repo, instead of giving them permission to commit to the repo directly. That way only accepted Pull Requests could result in a Published KB Article being updated by changes to the GitHub Repo.