Add support for export/import to Gitlab snippets
See original GitHub issueFeature Request
What would you like to be able to do?
Export and import config to Gitlab in the same manner as Github.
Support both gitlab.com and internal gitlab instances.
Snippets API: https://docs.gitlab.com/ee/api/project_snippets.html
API Examples:
http POST https://gitlab.com/api/v4/snippets?private_token=$PRIVATE_TOKEN \
title="Nevegreen Config Backup" \
file_name=nevergreen.json \
visibility=public \
content=@nevergreen-config.json
http GET https://gitlab.com/api/v4/snippets/$SNIPPET_ID/raw?private_token=$PRIVATE_TOKEN
http PUT https://gitlab.com/api/v4/snippets/$SNIPPET_ID?private_token=$PRIVATE_TOKEN \
title="Nevegreen Config Backup" \
file_name=nevergreen.json \
content=@nevergreen-config.json
Remaining Tasks
Prod code:
- Handle error messages from GitLab
- Update schema to add new GitLab config
- Allow custom hosts to be added to the CSP (similar to iframe)
- Help text
- Mobile styling (issue with tabs overflowing)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Migrating projects using file exports - GitLab Docs
Existing projects on any self-managed GitLab instance or GitLab.com can be exported to a file and then imported into a new GitLab instance....
Read more >Snippets - GitLab Docs
Add or remove multiple files. Introduced in GitLab 13.5. A single snippet can support up to 10 files, which helps keep related files...
Read more >Project import/export API - GitLab Docs
It contains all the necessary information to upload the exported project to a web server or to any S3-compatible platform. For exports, GitLab:...
Read more >gitlab import/export: add support for system note metadata
This MR adds support for exporting and importing system note metadata, which improves the quality of export/import functionality.
Read more >Add Project Import/Export Functionality (#3050) · Issues - GitLab
Add the ability to export/import single projects. ... In any case, the more stuff we will support to be migrated, the more export/import...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, if we do it from the UI we’ll need to update the
content security policy
connect-src
to include gitlab.Tested with a hosted GitLab. All working.
We could improve things by pre-populating the available URLs given the environment variable provided by the user, but given [#271] will make the environment variable redudant I’d suggest we don’t do this just now.