[x] Edit and finalize draft for publishing (remove draft label, add draft-finalized label)
[ ] Assign Issue to yourself and create Markdown file (remove draft-finalized label, add pending)
[ ] Project Lead: Review and Publish KB Article (remove pending label, add published label)
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.
KB Article Creation Checklist
draft
and eitherquestions
ortutorials
draft
label, adddraft-finalized
label)draft-finalized
label, addpending
)pending
label, addpublished
label)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 asstatus: pending
orstatus: 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.