use constans
This commit is contained in:
parent
248bc118a4
commit
56f38ea973
|
@ -8,7 +8,7 @@ require_relative './services/merge_branch_service'
|
|||
@github_token = ENV['GITHUB_TOKEN']
|
||||
|
||||
inputs = {
|
||||
type: ENV['INPUT_TYPE'] || 'labeled', # labeled | comment | now
|
||||
type: ENV['INPUT_TYPE'] || MergeBrachService::TYPE_LABELED, # labeled | comment | now
|
||||
label_name: ENV['INPUT_LABEL_NAME'],
|
||||
target_branch: ENV['INPUT_TARGET_BRANCH']
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class MergeBrachService
|
|||
case inputs[:type]
|
||||
when TYPE_LABELED
|
||||
labeled_valid?
|
||||
when 'now'
|
||||
when TYPE_NOW
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue