mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add branch option to remote theme import
* FEATURE: add branch option to remote theme import * FIX: Add missing variable in params * FIX: Add missing param for import_theme method * SPEC: Add test methods for branch support in git import * FIX: Add missing space to scss style * Do not assume default branch as master * Change branch field placeholder * FIX: add missing div start tag
This commit is contained in:
@@ -76,7 +76,8 @@ class Admin::ThemesController < Admin::AdminController
|
||||
end
|
||||
elsif params[:remote]
|
||||
begin
|
||||
@theme = RemoteTheme.import_theme(params[:remote], current_user, private_key: params[:private_key])
|
||||
branch = params[:branch] ? params[:branch] : nil
|
||||
@theme = RemoteTheme.import_theme(params[:remote], current_user, private_key: params[:private_key], branch: branch)
|
||||
render json: @theme, status: :created
|
||||
rescue RuntimeError => e
|
||||
Discourse.warn_exception(e, message: "Error importing theme")
|
||||
|
||||
Reference in New Issue
Block a user