Code Contribution
Overview
The below recommended Github workflow allows developers to submit code and documentation contributions to eSignet open-source repositories.
Repositories
Setup your development machine
Fork repository of interest.
Clone the fork to your local machine. E.g.:
$ git clone https://github.com/<your_github_id>/esignet.git
Set the upstream project as the original from where you forked. E.g.:
$ cd esignet $ git remote add upstream https://github.com/mosip/esignet.git
Make sure you never directly push upstream.
$ git remote set-url --push upstream no_push
Confirm the origin and upstream.
$ git remote -v
Code changes
Create a new issue in GitHub.
Follow the issue template provided.
Please provide as much information as possible.
If you want to develop a new feature, please elaborate on the idea and discuss the design before starting development.
In your local repository, fetch the upstream.
$ git fetch upstream
3. On your local repo, switch to a branch if you are working on an older release (like the 1.0.0 branch) or stay in main/develop
the branch.
$ git checkout upstream/<branch>
4. Create a new issue branch with the name of the issue.
$ git switch -c issue-<issue number>
5. Make sure you are up-to-date with the upstream repo.
$ git pull upstream <branch>
6. Now feel free to make the change in the code or documentation. Reach out to our community for any queries. Once done with the work, commit your changes by referring to the Issue ID in the commit message. Eg:
$ git commit -m "[#1234] Adding new upload feature in eSignet service"
7. Once again, ensure you are up-to-date with the upstream repo as it may have moved forward.
$ git pull upstream <branch>
8. Build and test your code. Make sure to follow the coding guidelines. Provide unit test cases for the changes you have built.
9. Push to your forked repo (origin).
$ git push --set-upstream origin issue-<issue number>
10. On your forked remote repository from GitHub, create a pull request using the Contribute button. Direct the pull-request to main
or any specific branch upstream.
11. Make sure the automatic tests on GitHub for your pull request pass.
12. Reviewers shall review the pull request. Reach out to the community for a faster response.
Last updated
Was this helpful?