Version 2019-Spring-1.0, Revised 3 March 2019

CS-348 01, 02, 03 — Spring 2019

GitIssueActivity

Activity for practicing with Git branching, GitHub issues and merge requests, and Kanban flow.

For this activity, the students will practice making changes to a GitHub repository. The repository has a text file that has been "scrambled" - meaning that random words have had their characters randomly rearranged, and considered to be issues to be fixed.

The misspellings were generated by the twiddle.py program and then entered as issues by the report.py program (from this git-twiddler fork.

Prereqisites

  1. Git installed and configured on your computer.
  2. GitHub account created and username emailed to professor.
  3. Invitation to class organization on GitHub accepted.
  4. SSH key added to GitHub account.

Set up for In-Class Activity

  1. Fork the repository
  2. Clone the repository
  3. Add the original repository as an upstream remote: git remote add upstream git@github.com:cs-worcester-cs-348-sp-2019/git-issue-activity.git

Repeat as often as possible during the class:

1. Assign yourself to an issue on GitHub (e.g. Issue #42)

  1. Go to the project board: https://github.com/cs-worcester-cs-348-sp-2019/git-issue-activity/projects/1
  2. Assign yourself to an issue that is unassigned.
  3. Move the card from To Do to In Progress.

2. Work on the issue on your computer

  1. Make sure you are on the Master branch: git checkout master
  2. Pull any changes that have ocurred since your last pull, and correct merge conflicts git pull upstream master
  3. Create a branch named for the issue (e.g. issue-42), and switch to that branch: git checkout -b issue-42
  4. Edit the LICENSE file to correct the issue
  5. Add the change
  6. Commit the change, with a message describing the change (include line number and correction, e.g. Correct misspelling, line 1: UGN -> GNU )
  7. Pull any changes that have ocurred since your last pull, and correct merge conflicts git pull upstream master
  8. Push the change git push origin issue-42

3. Make a pull request on GitHub

  1. On GitHub, make sure you are on your fork, then switch to the newly pushed branch (e.g. issue-42)
  2. Click the New Pull Request button.
  3. Include in the pull request text a notation that it closes the assigned issue (e.g. Closes #42)
  4. Click Create Pull Request
  5. On the project board, move the card for your issue from In Progress to Waiting for Merge.

4. Review and apply a merge request

  1. If the Pull Requests tab shows any pull requests waiting, click on the tab.
  2. Select a pull request from someone else, and click on the title. (Never merge your own pull requests! A pull request should be reviewed by someone other than the person who created it.)
  3. Click on the commit message (below the comment - you will see the commit number to the right) to view the commit.
  4. You will see the differences.
    1. If it looks correct:
      1. Click on Review Changes.
      2. Select Approve.
      3. Click Submit review.
      4. Merge the pull request.
      5. The card will automatically move to Done because the issue has been closed.
    2. If it looks wrong:
      1. Click on Review Changes.
      2. Make a comment suggesting a correction.
      3. Select Request changes.
      4. Click Submit review.
      5. The person who made the merge request will be notified.

5. Continue at #1 to assign yourself a new issue.

Copyright and License

©2019 Karl R. Wurst, Worcester State University

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.