Workflow for adding code

1. Get a github account

First, create a github account.

Ushahidi code development is happening in Github. We track all our tasks, both front-end and back-end, in issues connected to the repo Platform API.

2. Set up the developer environment

Follow these guides to set up your developer environment:

3. Find a feature to work on

The best way to pick a feature to work on is to say hi to Ushahidi’s developers in our community Discord-server, let us know what you’d like to work on (front end, back end, etc), and chat about what could be suitable for you. You can find more info on how to contact us here.

Ushahidi issues (bugs, feature requests, etc) are in Github Issues. Find something that needs doing.

  • Community tasks in github are feature that are up for grabs by community devs.

4. Start a branch for your work

If you’re working on an issue that nobody has claimed before, you will need to create a branch that is specific to this issue. To do this, cd (change directory) into your Ushahidi code in the terminal window, and type:

git checkout development
git pull
git checkout -b some-task

Where “some-task” is a short description without spaces of what this task is (e.g. “visualise-data”). Now you can start work on your code.

5. Write Code

Now write your code.

If you get stuck, or want to talk through ideas, you can ask for help in the community Discord-server.

6. Submit your code

When you’re ready to submit your code for approval, do this:

  1. Commit and push your code

    git add .
    git commit -m “message about this commit”
    git push origin some-task
  2. Then, open your fork on github, ie. "https://www.github.com/yourusername/platform". You’ll see a banner indicating that you’ve recently pushed a new branch, and that you can submit this branch “upstream,” to the original repository.

  3. Click on "Compare and Pull Request" to create a pull request. Enter a title and description, then click "Create pull request".

The first time you submit code you may be asked to sign Ushahidi’s contributor agreement.

The Ushahidi admins will then review and comment on your code, and will either accept your code or ask you to make changes to it. If you are asked to make changes to your code, make those changes then resubmit your code using:

git add .
git commit -m “message about this commit”
git push origin some-task

If your code is accepted, then the admin will merge your pull request. Your code will then appear in the Ushahidi Platform GitHub repository, with you credited for it.

7. Further Reading

Last updated