diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-19 17:32:40 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-19 17:32:40 +0300 |
commit | 0e9323bd4a61e7125ed90fc60d8072377b6d0c38 (patch) | |
tree | 7cbd9ed017ba5473dfc77cf8fdb7ddb6528d13a8 /app/services | |
parent | 6593e3cef81408efd1e20a976d4c2471970ddfeb (diff) | |
parent | f85b78c1e996431c52bba185641d1b426580c3ad (diff) |
Merge branch 'fix/import-export-project-avatar' into 'master'
Project avatar import/export functionality
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19851
Adds logic to export and import a project avatar
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5273
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/import_export/export_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb index 998789d64d2..06252c7b625 100644 --- a/app/services/projects/import_export/export_service.rb +++ b/app/services/projects/import_export/export_service.rb @@ -9,7 +9,7 @@ module Projects private def save_all - if [version_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) + if [version_saver, avatar_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) Gitlab::ImportExport::Saver.save(project: project, shared: @shared) notify_success else @@ -21,6 +21,10 @@ module Projects Gitlab::ImportExport::VersionSaver.new(shared: @shared) end + def avatar_saver + Gitlab::ImportExport::AvatarSaver.new(project: project, shared: @shared) + end + def project_tree_saver Gitlab::ImportExport::ProjectTreeSaver.new(project: project, shared: @shared) end |