dwyl / github-backup

:octocat: :back: 🆙 Backup your GitHub Issues so you can still work when (they/you are) offline.
https://github-backup.herokuapp.com
GNU General Public License v2.0
32 stars 3 forks source link

Backup everything since a repo has been created? #9

Closed SimonLab closed 6 years ago

SimonLab commented 6 years ago

Should the Github App back up all the issues and comments since the creation of a repo. For example when the Github App is installed we could retreive all the existing data and save them in our database, however we won't have the history of the edit of comments.

From an mvp perspective I would only start saving new issues, new comments and new edited comments since the Github app is installed. Thoughts?

Cleop commented 6 years ago

Good question @SimonLab

I would probably take a copy of all the existing open issues, that way you can capture on going conversations in comments that otherwise wouldn't be picked up. But I agree that copying closed issues could be unnecessary.

I'm open to others thoughts though

nelsonic commented 6 years ago

@SimonLab we won't be able to get past edits (from before the app was enabled) however I do agree that it makes sense to retrieve the closed issues for the simple reason that we occasionally refer to issues that are complete.

SimonLab commented 6 years ago

Thanks for the replies 👍 So to recap, when the "github backup" Github app is installed on a repository, our server will receive a new "installationEvent" notification (https://developer.github.com/v3/activity/events/types/#installationevent). At this point we can then ask Github for all the issue's descriptions (open and closed) and the comments linked to these issues and save this information (in DB or files). Does this steps make sense?

nelsonic commented 6 years ago

@SimonLab these steps make perfect sense. Perhaps we should open an new issue called "Installation" with a detailed checklist of what needs to be done? 😉

Cleop commented 6 years ago

Articles on how to get closed issues from a repo:

image https://developer.github.com/v3/issues/

https://developer.github.com/changes/2014-02-28-issue-and-pull-query-enhancements/

Cleop commented 6 years ago

To conclude this issue, we agreed that yes, all issues (open or closed) should be backed up. This has now been put into action in #29.

For that reason @SimonLab - please can you close this issue?