use constans

This commit is contained in:
miguemasx 2020-03-15 22:46:46 +01:00
parent 248bc118a4
commit 56f38ea973
2 changed files with 2 additions and 2 deletions

View File

@ -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']
}

View File

@ -21,7 +21,7 @@ class MergeBrachService
case inputs[:type]
when TYPE_LABELED
labeled_valid?
when 'now'
when TYPE_NOW
true
end
end