Testing a KubeStellar documentation PR
If a contributor has not created a sharable preview of a documentation PR as documented in the documents management overview , here are the steps to checkout a git pull request for local testing.
STEP 1: Checkout the Pull Request**
Helpers: GitHub , DevOpsCubeÂ
Following is approach to checking out the branch that a PR asks to merge. Alternatively you could use any other technique that accomplishes the same thing.
1.1 Use git fetch to get a local copy of the PR’s branch (note: be sure to check out the right PR!)
Fetch the reference to the pull request based on its ID number, creating a new branch locally. Replace ID with your PR # and BRANCH_NAME with the desired branch name. The branch name will be used in your local workspace; you can pick anything you like.
The following command assumes that your local workspace has a “git remote” named “upstream” that refers to the shared repository at github.com/kubestellar/kubestellar.
git fetch upstream pull/ID/head:BRANCH_NAME1.2 Switch to the new branch
Checkout the BRANCH_NAME where you have all the changes from the pull request.
git checkout BRANCH_NAMEAt this point, you can do anything you want with this branch. You can run some local tests, or merge other branches into the branch.
STEP 2: Test and Build the Documentation (optional)**
See Serving up documents locally for how to view and modify the documentation in the branch that you have checked out.