[refs #90] add state setter
This commit is contained in:
parent
381ae0a8b9
commit
d4a5b78b21
|
@ -40,6 +40,10 @@ class PullRequest < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def state=(value)
|
||||||
|
issue.state = value
|
||||||
|
end
|
||||||
|
|
||||||
def can_merge?
|
def can_merge?
|
||||||
state == 'ready'
|
state == 'ready'
|
||||||
end
|
end
|
||||||
|
@ -55,8 +59,7 @@ class PullRequest < ActiveRecord::Base
|
||||||
system("cd #{path} && git reset --hard HEAD")
|
system("cd #{path} && git reset --hard HEAD")
|
||||||
block
|
block
|
||||||
else
|
else
|
||||||
puts "ret is #{ret}"
|
raise ret
|
||||||
raise
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue