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