dwyl / dwyl/github-backup

Application Flow

Open
#11 5 comments 1 reaction 2 assignees Claimed by @Cleop View on GitHub
discuss epic
Dominant language
Elixir
Stars
33
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## Github App send events
The Github app will send the following events to the server:
- new installation on repository
- new issue
- new comment on issue
- issue's description edited
- comment edited

Questions:
- A Github App can also be installed on an organisation, will this trigger an event for all the repository of the organisation? We need to get more details on how webhooks work with organisations and test it once we have a server running. see https://developer.github.com/webhooks/#events
- Is the "issue edited" and "comment edited" events are the same? I think the events are different: https://developer.github.com/v3/activity/events/types/#issuecommentevent and https://developer.github.com/v3/activity/events/types/#issuesevent

## Server receive events

The server will receive a post request from the Github App for each Github app webhooks events (see above). The main role of the server is to determine the type of the events, this can be done based on the payload (and often the "action" value of the payload). Then the information of the payload is saved in database and files (see https://github.com/dwyl/github-backup/issues/3#issuecomment-365650695). Once the information is saved the server can add more information on the issue to let the Github users know how to access the backup data.

Questions:
- Which information needs to be saved in the database, what is the architecture of the Postgres database?
- What are the information and structure (json?) of the files we want to create?

## Add "backup" link to issues
Once a backup of the issue has been created the server will update the issue/comment with a link to the "backup" app

Questions:
- How to represent the link to the backup app on Github? Edit the issue/comment and add a link at the bottom? Can we apply a template?
- Should the link be display on the description of the issue and on each comment or only on the issue itself?

## See backup

The users of a repository can access the backup of the issues/comments. The application needs to check the permission of the users and then display the information

Questions:
- Who can access the "backup" app, see https://github.com/dwyl/github-backup/issues/7#issuecomment-365691051 ?
- How to represent the history of the edits? Download json file only or display a list of edit sorted by date?

I try to describe the main steps of the flow, some parts need a lot of more details and we can create new issues for them. I am not sure especially on the last two section: how to add and represent the link to the "backup" app on Github issues and how the "backup" app display the information to the users. Let me konw which steps I have missed!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.