Handle an OpenMRS Ticket (Activity)
From Foss2Serve
Revision as of 14:26, 8 February 2017 by Clif.kussmaul (Talk | contribs)
Title |
Handle an OpenMRS Ticket |
---|---|
Overview |
Use git and Eclipse to handle an OpenMRS ticket. |
Prerequisites |
A working github account, Eclipse configured for OpenMRS |
Learning Objectives |
After successfully completing this activity, the learner should be able to:
|
Process Skills Practiced |
Video
Watch the OpenMRS University video, http://www.youtube.com/watch?v=SbbDvMVgRWo entitled, “OpenMRS University: Contributing Code.”
Handle a Ticket
The following steps are followed in the video:
- Claim the ticket
- Fork the appropriate repository on github.
- The project name is in the upper-left corner of the ticket next to the ticket id.
- Clone the repository to your local machine.
-
git clone <repository url>
- The repository url should point to the forked copy on your github account.
-
- Set the upstream repository
-
git remote add upstream <repository url>
- The repository url should point to the original copy of the project on github.
- You must be in the project directory for this command to succeed.
-
- Fetch all the current branches of the project.
-
git fetch –all
- FIXME I don’t quite understand why this is necessary. What did we have after the clone?
-
- Pull all changes from the upstream master
-
git pull –rebase upstream master
- FIXME In the video and on my sample ticket, there were no changes. I don’t understand how there could be after the fetch (much less after the clone).
-
- Create a branch to work in
-
git checkout -b <branch name>
- Use the ticket identifier as the branch name.
-
- Import the project into Eclipse
- Use the “Browse..” button to point at the directory containing the project.
- Tell Eclipse that the project uses git.
- Select all the projects, and then right click. Select “Team” and then “Share Project...” The default opens are correct.
- Do not use “Share Projects” (plural). This is for adding a new form of sharing.
- Handle the issue described in the ticket...
- Add your changes to the staging area of your local repository.
- for an interactive add
-
git add -i
- to add specific files
-
git add <filename>
- Commit your changes to your local repository
-
git commit -m "<ticket id>: <commit message>"
-
- Push the changes in your branch back to the origin on github.
-
git push origin <branch id>
-
- Change to the branch on github, and make a pull request
- Include the URL of the ticket.
- Be sure to check the “Commits” and “Files Changed” tabs to be sure you are sending the correct changes.
- Request a code review on the ticket page
- Include the URL of the pull request in the comment for the code review.
- Wait. Someone from OpenMRS will respond to the pull request.
ACM BoK Area & Unit(s) |
|
---|---|
ACM BoK Topic(s) |
|
Difficulty | |
Estimated Time to Complete |
60 minutes plus time to solve the ticket |
Environment / Materials |
Access to Internet / Web and web browser, git, Eclipse |
Author(s) |
Ben Coleman |
Source | |
License |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License FIXME check that this license is appropriate |