|
| 1 | +# Contributing guidelines for closed content |
| 2 | + |
| 3 | +This document describes the process for authoring "closed content", which is content of a sensitive nature that cannot be publicised before release. |
| 4 | + |
| 5 | +Sensitive content might include: |
| 6 | + |
| 7 | +- Security content, including personally identifying information (PII). |
| 8 | +- Content / features that are not yet ready to be announced. |
| 9 | + |
| 10 | +We work in public by default, so this process should only be used on a case by case basis by F5 employees. |
| 11 | + |
| 12 | +For standard content releases, review the [Contributing guidelines](/CONTRIBUTING.md). |
| 13 | + |
| 14 | +## Overview |
| 15 | + |
| 16 | +This repository (https://github.com/nginx/documentation) is where we work by default. It has a one-way sync to an internal repository, used for closed content. |
| 17 | + |
| 18 | +The process is as follows: |
| 19 | + |
| 20 | +- Add the closed repository as a remote |
| 21 | +- Create a remote branch with the prefix `internal/` in the closed repository |
| 22 | +- Open a pull request in the closed repository to get previews and request feedback |
| 23 | +- Once all stakeholders are happy with changes, close the pull request in the closed repository |
| 24 | +- Merge the changes from the remote (Closed) repository branch with a new branch in the open repository |
| 25 | +- Open a new pull request in the open repository, where it can be merged |
| 26 | + |
| 27 | +You can get the URL through our internal communication channels: it will be represented in the following steps as `<closed-URL>`. |
| 28 | + |
| 29 | +## Steps |
| 30 | + |
| 31 | +To create closed content, add the closed repository as a remote to the main repository, then fetch. |
| 32 | + |
| 33 | +```shell |
| 34 | +cd documentation |
| 35 | +git remote add internal [email protected]: <closed-url >.git |
| 36 | +git fetch |
| 37 | +``` |
| 38 | + |
| 39 | +Check out the remote `main` branch, and use it to create a feature branch. **Ensure that you prefix all branch names with `internal/`** |
| 40 | + |
| 41 | +```shell |
| 42 | +git checkout internal/main |
| 43 | +git checkout -b internal/feature |
| 44 | +``` |
| 45 | + |
| 46 | +Once you've finished with your work, commit it and push it to the internal repository: |
| 47 | + |
| 48 | +```shell |
| 49 | +git add . |
| 50 | +git commit |
| 51 | +git push internal |
| 52 | +``` |
| 53 | + |
| 54 | +Open a pull request when you are ready to receive feedback from stakeholders. |
| 55 | + |
| 56 | +After any iterative work, close the pull request. Since the closed repository is a mirror of the open one, we do not merge changes to it. |
| 57 | + |
| 58 | +Change back to the origin `main` branch, create a new branch, merge your internal branch and push to origin. |
| 59 | + |
| 60 | +```shell |
| 61 | +git checkout main |
| 62 | +git checkout -b feature |
| 63 | +git merge internal/internal/feature |
| 64 | +git push origin |
| 65 | +``` |
| 66 | + |
| 67 | +Once the content changes have been merged in the open repository, they will synchronize back to the closed repository. |
0 commit comments