Skip to content

Commit

Permalink
[webui] Add commit messages to repository controller actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBr committed Aug 19, 2016
1 parent fdd0059 commit c2818e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/app/controllers/webui/repositories_controller.rb
Expand Up @@ -53,7 +53,7 @@ def create
end

if repository.save
@project.store
@project.store({ comment: "Added #{repository.name} repository" })
flash[:success] = "Successfully added repository '#{repository.name}'"
respond_to do |format|
format.html { redirect_to({ action: :index, project: @project }) }
Expand All @@ -76,7 +76,7 @@ def update
archs = params[:arch].keys.map { |arch| Architecture.find_by_name(arch) } if params[:arch]
repo.architectures = archs
repo.save
@project.store
@project.store({ comment: "Modified #{repo.name} repository" })

# Merge project repo's arch list with currently available arches from API. This needed as you want
# to keep currently non-working arches in the project meta.
Expand All @@ -92,7 +92,7 @@ def destroy
repository = @project.repositories.find_by(name: params[:target])
result = repository && @project.repositories.delete(repository)
if @project.valid? && result
@project.store
@project.store({ comment: "Removed #{repository.name} repository" })
respond_to do |format|
flash[:success] = "Successfully removed repository '#{repository.name}'"
format.html { redirect_to({ action: :index, project: @project }) }
Expand Down

0 comments on commit c2818e9

Please sign in to comment.