Skip to content
Snippets Groups Projects
Commit d1130424 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Dont run build for branch remove

parent 82a378c8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -64,12 +64,17 @@ class ProjectsController < ApplicationController
end
 
def build
if @project.valid_token?(params[:token])
@build = @project.register_build(params)
Resque.enqueue(Runner, @build.id) if @build
head 200
else
end
# Ignore remove branch push
return head(200) if params[:after] =~ /^00000000/
@build = @project.register_build(params)
if @build
Resque.enqueue(Runner, @build.id)
head 200
else
head 500
end
end
 
# Project status badge
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment