Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint - Contributors #228

Closed
nathanfallet opened this issue Apr 20, 2021 · 17 comments · Fixed by #521
Closed

Endpoint - Contributors #228

nathanfallet opened this issue Apr 20, 2021 · 17 comments · Fixed by #521
Labels
enhancement New feature or request question Further information is requested

Comments

@nathanfallet
Copy link
Member

nathanfallet commented Apr 20, 2021

An endpoint to get the list of all contributors.

A GitHub endpoint exists, but some contributors might not be there if they did not commit to the repo (https://api.github.com/repos/CovidtrackerFR/vitemadose/contributors)

Example of JSON output that would be given by this endpoint: (light and easy to manipulate)

[
  {
    "section": "Team iOS",
    "users": [
      {
        "nom": "John Doe",
        "image": "https://github.com/JohnDoe.png",
        "role": "Publication App Store",
        "detailsURL": "https://github.com/JohnDoe"
      },
      ...
    ]
  },
  ...
]

Can be a static JSON file, edited by hand, served by the API.

@Noezor
Copy link
Collaborator

Noezor commented Apr 20, 2021

We discussed that the github API was good enough for now for backend; Let's see if we change our mind. CC @Maijin

@nathanfallet
Copy link
Member Author

@Noezor So we would fetch the GitHub API for each repo (this one, front, ios and android), with a section for each one? What about people which helped but are not in GitHub contributions? What about the full name and the detail text (role) for each person?

Here is how we plan to show it on the iOS side, so you can see. Current data is hardcoded in the app for development purpose.
IMG_0882

@Maijin
Copy link
Collaborator

Maijin commented Apr 20, 2021

Yes I think that may be good to use Github API for every repository as it would cover most contributors and eliminate the need for manual labour.

The picture can easily be fetched via the API as well.

For people missing as contributors we will need to figure out a different way but I checked and It seems that all the reviewers have made at least 1 commit. (But I may missed one)

@nathanfallet
Copy link
Member Author

@Maijin Yes but as I said in my last message, this does not give the Full Name and Role in the project

@aureliancnx
Copy link
Collaborator

Generating a JSON file with contributors, fetched from Github API requires some extra work, but nothing too complicated.

It's true that it's not really the task of the scraper, but a small python file that takes care of that and refreshes the list of contributors to send it to the data-auto branch doesn't seem to be an issue for me.

I can handle it if you want

@Maijin
Copy link
Collaborator

Maijin commented Apr 20, 2021

The Fullname is available here in the API: https://api.github.com/users/Floby (this URL is given in the first endpoint)

@Maijin Maijin added enhancement New feature or request question Further information is requested labels Apr 21, 2021
@fcamblor
Copy link

fcamblor commented May 7, 2021

@nathanfallet
Copy link
Member Author

We might be able to create a static file by hand and serve it as vitemadose.gitlab.io/vitemadose/contributors.json with all the information from this spreadsheet. I'm okay to do it, I just don't known where to put this static file (in which folder of the repo?) and if a script should be added to copy it to gitlab (in this case where and how?)

@aureliancnx
Copy link
Collaborator

aureliancnx commented May 13, 2021

FYI, contributors to the project (including non devs) can be accessed here : https://docs.google.com/spreadsheets/d/17Fky1Fs-6dKP7xGigSrSB9McEyQxepRSyMF5Dn5S5lg/edit?usp=drive_web&ouid=116774225944385293061

Note that Spreadsheet can be exported as JSON here : https://spreadsheets.google.com/feeds/cells/17Fky1Fs-6dKP7xGigSrSB9McEyQxepRSyMF5Dn5S5lg/1/public/full?alt=json

It seems the spreadsheet can't be edited, I can't add my info in it.

@Maijin
Copy link
Collaborator

Maijin commented May 13, 2021

@aureliancnx go in "Presentez-vous' on mattermost

@Maijin
Copy link
Collaborator

Maijin commented May 13, 2021

Je pense on va pouvoir fermer cette issue car on utilise maintenant le Google Spreadsheet centralisé

@nathanfallet
Copy link
Member Author

@Maijin Du coup on se base tous (front/ios/android) sur ce fichier ? On ne le remap pas sur le back avec un format plus simple ? (pour trier en sections par team par exemple)

@fcamblor
Copy link

Même si j'ai fait un petit google app script pour exporter les infos, je pense qu'un JSON en direct dans un repository serait tout autant simple à maintenir/éditer

@nathanfallet
Copy link
Member Author

@fcamblor En effet, si on garde un fichier static servit comme vitemadose.gitlab.io/vitemadose/contributors.json dans un repo, il sera simple à maintenir. On peut se base sur le format que j'ai définis en ouvrant cette issue pour avoir tous la même chose à décoder côté font/ios/android (format simple et léger en plus)

@Floby
Copy link
Collaborator

Floby commented May 20, 2021

du coup pour l'instant j'ai un peu tout mis en bazar dans la ressource :)
il y a un fichier contributors_all.json qui regroupe tous les contributeurs (github) et un JSON par team

@nathanfallet
Copy link
Member Author

@Floby Parfait, je test ça dans l'app iOS ce weekend

@nathanfallet
Copy link
Member Author

Ça fonctionne sur iOS, ça fonctionne aussi sur le site. Je close l'issue, l'endpoint est ready !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants