Learn how to use GitHub and contribute to the knative/docs
repo.
To check out your fork of the knative/docs
repository:
-
Create your own fork of the
knative/docs
repo. -
Configure GitHub access through SSH.
-
Clone your fork to your machine and set the
upstream
remote to theknative/docs
repository:mkdir -p ${GOPATH}/src/knative.dev cd ${GOPATH}/src/knative.dev git clone [email protected]:${YOUR_GITHUB_USERNAME}/docs.git cd docs git remote add upstream https://github.com/knative/docs.git git remote set-url --push upstream no_push
You are now able to open PRs, start reviews, and contribute fixes the
knative/docs
repo. See the following sections to learn more.
Important: Remember to regularly sync your fork.
Knative uses Github issues to track documentation issues and requests. If you see a problem with the documentation that you're not sure how to fix, submit an issue using the following steps:
-
Check the Knative docs issues list before creating an issue to avoid making a duplicate.
-
Use the correct template for your new issue. There are two templates available:
-
Bug report: If you're reporting an error in the existing documentation, use this template. This could be anything from broken samples to typos. When you create a bug report, include as many details as possible and include suggested fixes to the issue. If you know which Knative component your bug is related to, you can assign the appropriate Working Group Lead.
-
Feature request: For upcoming changes to the documentation or requests for more information on a particular subject.
-
Note that product behavior or code issues should be filed against the individual Knative repositories.
Documentation issues should go in the
knative/docs
repo.
The Knative documentation follows the standard GitHub collaboration flow for Pull Requests (PRs).
General details about how to open a PR are covered in the Knative guidelines.
-
Locate or create the file that you want to fix:
-
If you are updating an existing page, locate that file and begin making changes.
For example, from any page on the Knative website, you can click the pencil icon in the upper right corner to open that page in GitHub.
-
If you are adding new content, you must follow the "new docs" instructions.
-
-
To edit a file, use the new branch that you created in your fork.
-
Navigate to that same file within your fork using the GitHub UI.
-
Open that file from in your local clone.
-
-
Create the Pull Request in the
knative/docs
repo. -
Assign an owner to the PR to request a review.
Here's what generally happens after you send the PR for review:
-
One of the assigned repo maintainers will triage the PR by assigning relative priority, adding appropriate labels, and performing an initial documentation review.
-
If the PR involves significant technical changes, for example new features, or new and changed sample code, the PR is assigned to a Subject Matter Expert (SME), typically an engineer working on Knative, for technical review and approval.
-
When both the technical writers and SMEs are satisfied with the quality of the writing and the technical accuracy of the content, the PR can be merged. A PR requires two labels before it can merge:
lgtm
andapproved
.-
The SME is responsible for reviewing the technical accuracy and adding the
lgtm
label. -
The Knative technical writers are who provide the
approved
label when the content meets quality, clarity, and organization standards (see the Knative style guide).
-
We appreciate contributions to the docs, so if you open a PR we will help you
get it merged. You can also post in the #docs
Slack channel to get input on your ideas or find
areas to contribute before creating a PR.
All PRs should be assigned to a single owner ("Assignee"). It's best to set the "Assignee" and include other stakeholders as "Reviewers" rather than leaving it unassigned or allowing Prow to auto assign reviewers.
Use the /assign
command to set the owner. For example: /assign @owner_id
For code related changes, initially set the owner of your PR to the SME who should review for technical accuracy. If you don't know who the appropriate owner is, nor who your reviewers should be for your PR, you can assign the current working group lead of the related component.
If you want to notify and include other stakeholders in your PR review, use the
/cc
command. For example: /cc @stakeholder_id1 @stakeholder_id2
See the Knative community guidelines about reviewing PRs
Knative uses several sets of tools to manage pull requests (PR)s and issues in a more fine-grained way than GitHub permissions allow. In particular, you'll regularly interact with Prow to categorize and manage issues and PRs. Prow allows control of specific GitHub functionality without granting full "write" access to the repo (which would allow rewriting history and other dangerous operations). You'll most often use the following commands, but Prow will also chime in on most bugs and PRs with a link to all the known commands:
-
/assign @user1 @user2
to assign an issue or PR to specific people for review or approval. -
/lgtm
and/approve
to approve a PR. Note that anyone may/lgtm
a PR, but only someone listed in anOWNERS
file may/approve
the PR. A PR needs both an approval and an LGTM — the/lgtm
review is a good opportunity for non-approvers to practice and develop reviewing skills./lgtm
is removed when a PR is updated, but/approve
is sticky — once applied, anyone can supply an/lgtm
. -
Both Prow (legacy) and GitHub actions (preferred) can run tests on PRs; once all tests are passing and a PR has the
lgtm
andapproved
labels, Prow will submit the PR automatically. -
You can also use Prow to manage labels on PRs with
/kind ...
,/good-first-issue
, or/area ...
-
See Cherrypicking for details about how to use the
/cherrypick
command.
-
The CLA check fails even though you have signed the CLA. This may occur if you accept and commit suggestions in a pull request from another person's account, because the email address of that account doesn't match the address on record for the CLA. The commit will show up as co-authored, which can cause issues if your public email address has not signed the CLA.
-
One or more tests are failing. If you do not see a specific error related to a change you made, and instead the errors are related to timeouts, try re-running the test at a later time. There are running tasks that could result in timeouts or rate limiting if your test runs at the same time.
-
Other Issues/Unsure -- reach out in the #docs Slack channel and someone will be happy to help out.