First Step in Open Source World with SUSI Android

SUSI Android is a conversational interface to provide intelligent answers using the loklak/AskSusi infrastructure. There are some prerequisites before entering into the Open Source World that you should have some knowledge of Git/GitHub and make yourself ready to interact with other Developers. If you don’t like reading, make reading your habit as reading lots of Documentation is going to be needed in Open Source World.

Roadmap for First Step in Open Source World:

  1. Sign In/Sign Up to GitHub and install GitHub Desktop Application
  2. Find and join fossasia organization and have the pride to be a member
  3. Read about susi_android and learn how to set up on your local machine
  4. Fork repo and clone it to your local machine
  5. Open project in Android Studio, run the app on your phone and have look about what you want to change or fix.

You are now ready to make the contribution to SUSI android. Congratulations and keep exploring other projects too.

Create Issue

Now, you have some list of what you want to change or fix!! Create a new issue so that you can start working on it with other developers

  1. Got to Issue Tab
  2. Click on New Issue
  3. Add appropriate title about your issue
  4. Tell about issue you want to create, add screenshot wherever possible
  5. Submit your issue
  6. Your issue is created and listed on the issue list. For eg. issue #1022

You can also work on any other issue listed, start conversation on issue with other developers and try to fix those issue

Make Changes And Send Pull Request

Before start making changes to code please create new branch as working in development branch will create lots of problems further. I am sharing the problem I faced and how I solved it at the end of the blog and because of that problem I am writing this blog to help people who want to start with open source contribution.

You can create branch using command line

git checkout -b “name your branch according to your issue”

Or, you can use GitHub Desktop Application, name your branch and from which branch you want to create your new branch as here I am creating new branch from development branch and create

Now do your relevant changes in the project or fix your issue, commit to your repository and then send the pull request to fossasia/development branch.

Now your code will go through some process like Codacy/CircleCI to check that merging your changes should not create a problem with other code and then finally it will be reviewed and merged. For eg. Pull Request #1026

Problem: I Faced and Solved

Problem

I started my first contribution with Readme file and sent a Pull Request #1017 which get merged. Then I created new issue #1022, work on it and sent Pull Request #1023 which after getting lots of conflicts and at last I have to close it.

All the time I am doing my work on my development branch and because of that when I sent Pull Request #1023, my previous commit of the first contribution also get included in this pull request and somehow my other changes also get committed in this PR (Pull Request). So now I have 1 PR with 2 other commits which are not relevant to that PR.

How I Solved It

I start with looking git log and copy the commit ID of the commit at which I have to take my repository back.

D:\user\your_github_project [development_branch]> git log

I come to know that all the commits I am doing in development branch so when I sent Pull request from my development branch to fossasia/development branch another commit also get included in it.

Now what I did is made 2 branches from my development branch as I have to send 2 pull request and go in that branch one by one

D:\user\your_github_project [development_branch]> git checkout your_branch

In the new branch, I apply the changes introduced by existing commits using the commit ID I copied then I move to GitHub Desktop Application where it shows my new branch with the commit for which I have to send PR and at last, I made Pull Request #1026 with the relevant commits

D:\user\your_github_project [your_branch]> git cherry-pick “your_commit_id”

Resources

Budding Android Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store