Skip to content

How To Edit An Existing Lab

Karin Levenstein edited this page Apr 3, 2019 · 15 revisions

To edit an existing lab

These are the high-level steps:

  1. Locate the GitHub source repository for the Learning Lab.
  2. Clone the repository locally.
  3. Create a new branch to work on your changes locally.
  4. Submit a Pull Request (PR) to discuss your proposed changes. Note that your changes are reviewed using the Cisco Style Guide for consistency.
  5. Assign a reviewer to the PR in the GitHub UI.
  6. Address any reviewer comments and amend your accordingly.
  7. If no one reviews for 2 days, send an email to a Learning Lab admin with a link to the PR.
  8. Self-merge a PR once it has been reviewed and approved.

These are the detailed steps:

  1. Locate the GitHub repo containing the source content for the lab. If you need to determine where the existing source is, contact an admin for Learning Labs. They can search for the Lab ID in the Admin UI and then locate the repo. For example, to edit the public learning lab howto at https://developer.cisco.com/learning/lab/learning-labs-howto/step/1, go to the public GitHub repo for that particular Learning Lab at https://github.com/CiscoDevNet/devnet-writing-guidelines.
  2. Write an Issue in the GitHub repo explaining what the bug is that you intend to fix. Write a comment that you plan to fix it. For example, https://github.com/CiscoDevNet/coding-series-learning-labs/issues/15 describes the change needed with a highlighted screenshot to illustrate the change.
  3. Clone the repository. The example below shows an SSH clone, which requires that you have set up SSH keys for GitHub.
    $ git clone [email protected]:CiscoDevNet/coding-series-learning-labs.git
    
  4. Change directories in to the clone location.
    $ cd coding-series-learning-labs
    
  5. Check out a new branch based on the master branch:
    $ git checkout –b branch-with-edits
    
  6. Make edits locally with your text editor.
  7. Commit to the local branch. For example:
    $ git commit –a –m “Edits to the Learning Lab writing guidelines for DevNet”
    
  8. Push your commit to a remote mapped to the original repository in this example, named origin:
    $ git push origin branch-with-edits
    
  9. Go to the GitHub website and create a pull request (PR) with edits by comparing to the upstream existing lab source. The review team meets regularly to review lab pull requests.
  10. Get reviews on the PR, addressing any edit needs by pushing again to the same branch on the remote named origin. For example:
    $ git commit –a –m “Addresses review comments”
    $ git push origin ag-branch-with-edits
    
  11. Self-merge the PR once it has been approved by reviewers.

Once the PR is merged by the reviewers, the reviewers create a release and then publish the release. The team can publish a release to staging as needed for output review.