Ability to send snapshots of repos to Zenodo
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=25587) </details> <!--IssueSummary end--> ### Problem to solve Make it easy for academic users on private / self-hosted GitLab (CE) instances to send snapshots of their repos to [Zenodo.org](https://about.zenodo.org/). ### Further details This would support academically recognised archival, persistent identification (by DOIs) and thus citation of code & software versions. See [#35023](https://gitlab.com/gitlab-org/gitlab-ce/issues/35023#use-cases) for use-cases. @schlauch and me are posting this issue in the hope of slicing that general request into more specific user stories. ### Proposal [As suggested](https://gitlab.com/gitlab-org/gitlab-ce/issues/35023#note_119190479), build a [Project Integration](https://docs.gitlab.com/ce/user/project/integrations/) like for example mocked-up in [GitHub.com/zenodo#1404](https://github.com/zenodo/zenodo/issues/1404), that allows project owners to to configure a connection between their GitLab project and Zenodo a deposit (ID, plus API token) activate a tag-hook that triggers a [GET /projects/:id/repository/archive](https://docs.gitlab.com/ce/api/repositories.html#get-file-archive) to GitLab [POST](http://developers.zenodo.org/#quickstart-upload)s the result, plus metadata about the GitLab project into the Zenodo deposit @schlauch [demonstrates](https://gitlab.com/schlauch/zenodo-api-test) that it is possible to mimic the [GitHub-Zenodo integration](https://guides.github.com/activities/citable-code/) almost completely, incl. updating the deposit to a new version with new files. As far as we understand, this would not require any changes on Zenodo’s side, because it relies on nothing else than [their public ReST API](https://developers.zenodo.org/#rest-api) plus a project owner’s [Zenodo access token (sandbox; with scopes `deposit:actions` & `deposit:write`)](https://sandbox.zenodo.org/account/settings/applications/tokens/new/). ### What does success look like, and how can we measure that? Maybe the number of Zenodo records / "deposits" created through GitLab repos? ~~I have asked Zenodo if they know (and can share) this for~~. Deposits from repos [integrated from GitHub](https://guides.github.com/activities/citable-code/): "bit more than 20000" (early Dec. 2018). ### Links / references - gitlab-org/gitlab#18763: Parent issue with general explanation, use-cases & web-hook-based solution idea for GitLab.com - [GitHub.com/zenodo#1404](https://github.com/zenodo/zenodo/issues/1404): Zenodo-side discussion, including mockup - customer requests: https://gitlab.com/gitlab-org/gitlab/issues/18763#note_215017430 & below <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
issue