cdoccdoc works with two repositories, a repository for code and another for
documentation.
The main branch of documentation repository will only have things that are already implemented and deployed. All upcoming changes, requirements etc would be kept in Pull Requests.
A change only goes from PR once it is done and deployed.
Ideally, before work starts, requirements should be written and approved by respective stakeholders, e.g. design/engineering/QA team, business stakeholders etc.
Requirement PRs are approved on Github PR UI of the documentation repository.
This is the first aprpoval. At this point developers can start work.
Once requirement PR is ready, development can begin, and when code is ready the code itself must be approved by the engineering team. At this point the meaning of approval is that this code is as per our code standards, does not introduce security issues, etc and is good enough to go to production.
Code PRs are approved on Github PR UI for the code repository.
cdoc ApprovalAt this point we have a approved requirement PR, and a corresponding code PR. Now someone has to visit PR Page, or the PR Description UI or Last Comment UI they will see a button to approve the PR.
Code approval means code is as per acceptable standards. Which implicitly can mean that someone has reviewed the docs and approved it. But it’s not obvious when someone is giving approval that they are approving just the code or they are certifying that yes, code is good and is exactly as per docs, and the entire requirement has been implemented with zero deviations and things are ready to proceed.
In many setups, the product manager, and QA team can do this approval. In fact for this aprpoval we do not even need to be able to read code at all, just the behaviour of the software on the user acceptance testing environment matches perfectly with the requirements in the docs PR.
The code changes will go to production by some sort of continuous delivery setup, and that step must merge the documentation PR as well.
Since the merge of two PRs are happening simultaneously, it is paramount that the documentation PR match perfectly with code change, else you will have changes merged in main branch which is yet in development step and people would not be able to fully trust the documentation.
In such cases people can visit the {pr-status.page}, and instead of connecting the repository, declare that this PR does not need documentation. Once this is done a comment would be posted on the PR about who authorised this PR without documentation, and the PR checks would turn green, and PR would be ready to merge.