Hi there! This guide aims to teach people unfamiliar with GitHub or the Git command line how to suggest edits and submit Pull Requests using only the GitHub Web UI. We will use the Tanzu Agile Practices section for our examples. Follow the steps below to get started!
It takes many clicks to suggest an edit, but these are the 5 big stages you have to go through.
- Prepare: Type up your suggested edits
- Fork: Forking just means creating a copy of the Tanzu Developer Center code and content (including the practices) in your GitHub account
- Edit: Copy and paste suggested edits into the files in your copy of the site through the GitHub UI and save it in a branch.
- Submit a Pull Request: Submitting a Pull Request is the technical term for submitting the suggested edits to be reviewed, approved by someone else and updated on the site. It is so named because the reviewer will be 'pulling' your code into the VMware repository to merge it.
- Delete: When the change is approved, delete your copy of the
tanzu-dev-portal
.
Repeat steps when you want to suggest new edits to the site.
If you’re doing this for the first time, set aside around 35 minutes to go through these steps.
-
Type up the changes you want to make to the
tanzu-dev-portal
pages you are updating. While any text editor will do, some editors include support for Markdown and may offer a better experience. We encourage multiple small changes which are easier to review and publish. -
Create a GitHub account, if you don’t have one, and login.
-
Go to the Tanzu Developer Center on GitHub This is where all the code for the site sits, such as Blogs, Guides, and Practices. It is also open to the public for contribution.
-
Click on Fork to make a copy of the code to your own GitHub account.
-
Check the title of the repository to make sure that you are editing on your own copy of the code. It should show your GitHub account name/tanzu-dev-portal, as you can see below:
-
Find the file you wish to edit. Using the "Design Studio" practice as an example, first click on content.
-
Click on practices. You’ll see a list of all the practices currently on the site.
-
Click on the practice you want to add to. For this example, I clicked on design-studio.
-
Click on
index.md
. This shows you what the page looks like in plain text. -
Click on the pencil edit icon. This shows you what the page looks like in markdown language. Don’t worry, markdown is a simplified HTML/CSS script. You may find GitHub's markdown guide helpful for learning the basic syntax for formatting.
-
Paste your edits into the right section. Also note that some of the pages use a special syntax for things like tips or callouts.
For example, I added a tip in the example above.
A tip is written like this:
{{%callout%}} This is a tip {{/%callout%}}.
Try to also keep to the indentation format so that the text looks neat and readable.
Unfortunately, at this point in time, it is not possible to preview what it will look like on the actual website, but you can click on the Preview Changes tab to see if the edits show up in the right places.
-
Scroll down to the Commit Changes section, and fill in the title. It defaults to
Update <the file you changed>
, but delete that and give it a short summary of what you did. Refer to the image below for an example. For help on writing good commit messages, check out this article. -
Fill up the extended description with the reason why the update was needed, or the context around the update. This will be read by the reviewers: help them understand why they should approve this edit!
-
Select ‘Create a new branch for this commit’
-
Create a name for the new branch that explains what it is
-
Click Propose Changes.
-
Click on the Pull Requests tab. Do NOT click the green ‘Create Pull Request’ button that appears at the bottom of the next screen.
-
Click ‘New Pull Request’.
-
Make sure that your base repository is
vmware-tanzu/tanzu-dev-portal
, and the head repository is your account. -
Change the dropdown for your “compare: main” to the name of the branch you have created.
-
Scroll down to check that text highlighted in green is the change you want to make.
-
Click Create Pull Request
-
Click Create Pull Request again. Tip: it's helpful to include the text
WIP
(for "Work in Progress") in the title of your pull request. This signals to the maintainers that it has just been opened and it not yet ready for review. When you have completed the process and are happy with your changes you can edit the title to remove this keyword. -
If you scroll down, you can see that the edits are going through some automated checks.
-
If you want to, you can keep the screen running until all the tests have passed, just to have a peace of mind. In the list of checks, some people can see a row below WIP called Netlify. If you see it, you can click on the Netlify row after all the checks have completed to preview how it will look on the site.
-
Otherwise, feel free to close GitHub and continue with your life. The checks will continue running even if you leave the page. Once the change passes through all the checks, it will land on the reviewers’ plate, and all you have to do is wait for it to be reviewed, approved and merged.
-
You’ve successfully suggested a change to the Tanzu Developer Center!
If there’s a change to the status of your pull request, GitHub will alert you via the email linked to your GitHub account, and add a notification to the notifications icon of your GitHub account. Here's how to check from the GitHub site:
-
Click on the notification icon.
-
Click on the notification with the name of the branch you submitted for pull request
-
Check out the status under the title! (Some possible statuses are: Open, Rejected, Merged, etc)
-
Go to your copy of the Tanzu Developer Center, making sure that you are in the right branch to make the edits.
-
Navigate to file you would like to update. For example, for a specific agile practice, click on the 'Content' folder, 'Practices' folder, the folder of the practice you edited, and then
index.md
. Click on the pencil icon to edit it. -
When saving the edits, under Commit Changes, fill in the title and description for the change.
-
This time, commit directly to the branch. Do NOT create a new branch. This updates your pull request with your latest edits.
That’s it!
Once you’re sure your edits have been merged, you can delete your repo with these steps: