Contributing to OpenMRS

This page describes the how to submit changes into a repository of the OpenMRS organization.

Preparation

  • First create an account on the OpenMRS Atlassian if you don't have one already.
  • Find out the ticket for the required functionality in the OpenMRS JIRA or create a new one. https://issues.openmrs.org
  • Once the ticket status is "Ready for Work", claim the issue.

Submitting Changes

  1. Fork the concerned repository from the OpenMRS organization to your own GitHub account if it is not yet forked already (see help.github.com).
  2. Open up a terminal window and enter the following commands to create a new development branch

    # Store the repository and ticket to be worked on in variables
    OPENMRS_REPO_NAME="" # e.g. "openmrs-core"
    OPENMRS_TICKET_ID="" # e.g. "TRUNK-4445"
    GITHUB_ACCOUNT="" # e.g. "jdoe"
    
    # Checkout the repository
    git clone https://github.com/$GITHUB_ACCOUNT/$OPENMRS_REPO_NAME
    cd $OPENMRS_REPO_NAME
    
    # Add the connection to the OpenMRS repository
    git remote add upstream https://github.com/openmrs/$OPENMRS_REPO_NAME
    
    # Update your master branch
    git pull upstream master
    
    # Checkout a new development branch
    git checkout -b $OPENMRS_TICKET_ID
  3. Commit your changes into git and push them to your GitHub account.

    # Review your changes and then submit them
    git status
    git add .
    git commit # see example commit message: https://github.com/openmrs/openmrs-core/commit/9fd5bafcd8ea4d807a5c5038de53b322828f2317
    
    # Push your branch to GitHub
    git push origin $OPENMRS_TICKET_ID
  4. Once you think you are done with the story, request a code review from another Bahmni developer. 
  5. Raise a pull request on the concerned repository in the OpenMRS organization and use the correct branch name for the same (see help.github.com). 
  6. Change the status of the card on the OpenMRS JIRA and add a comment to the card with a link to the pull request raised.
  7. Wait for feedback from the OpenMRS community.

More Information

OpenMRS




The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)