Google summer of code 2018— Final Report
Proposal Title : Updater for Libre EHR using Github API
Mentors : Tony McCormick, Nilesh Prasad
Description : This project aims to build a new updating system for Libre EHR application using the github API.The major idea behind the necessity of this project is patching the security vulnerabilities in the application.Because whenever a security vulnerability gets discovered and patched in the github repo, the user need to update the application manually, so it is essential to create this module and integrate it with this application
- User Mode (The mode for the normal users)
- Developer Mode(The mode for contributors, by which repo owners can test the PRs easily)
PULL REQUEST OF MY WORK :
@nileshprasad137 @tmccormi @teryhill @aethelwulffe first commit : started making the updater, placed the icon in the…github.com
fixes a bug which causes folders to appear as files in updater download modulegithub.com
logic mistake got fixed WIP : to improve the performancegithub.com
CONFIGURABLES : these are some configurables for updater which can be found on updater/settings.json
host : The host which the updater is making pull requests to, currently it is only using github API, but updater is built in way that it can adopt any API.
owner : The owner of the repository on which the updater should check for the updates
repository_name : The name at which the Libre EHR application is located
github_current : The pull request number at which the updater got merged in to the application, it can be added with or without #
feedback_issue_number : The issue number where we can get opinions of user for that update
db_backup_file : This file at which updater reads all the changed table names and it makes backup, restore from it.
The major problem i have faced in this project is i couldn’t get endpoint to fetch only merged requests from github API.
It can only give PRs in three states
- open (all open pull requests)
- closed ( couldn’t use it because it may also contain PR which got closed without merging)
- All (contain both open, closed PR)
So the only way i got is, i have to check the current PR time stamp against all other PRs.It caused a huge performance lag,it took me 1 min 30 seconds to loop through all pull request data. So i have cached the order the pull request got merged and reduced the performance lag
SCREENSHOTS OF MY WORK :
I have also made a video tutorial to help users to operate this module.
- To write api functions for the gitlab, bit bucket
- To add some user friendly features such as allowing full update ( without single PR by PR update)
I would like to thank my mentors Tony, Nilesh prasad for providing me assistance and helping me to shape the project idea.I would also like to thank Terry Hill, Arthur Eaton for providing support, ideas, encouragement during this period.They both supported me a lot in acheiving this goal.
Github profile : https://github.com/naveen17797
Blog posts : https://medium.com/@naveen17797