Declare message before using it ...

This commit is contained in:
TimmyCarbone 2019-08-02 14:57:40 +02:00
parent 399886cbca
commit d086f84434

View file

@ -29,6 +29,8 @@ if !pr
exit(1)
end
message = ARGV.join(' ')
coms = github.issue_comments(repo, pr["number"])
duplicate = coms.find { |c| c["user"]["login"] == 'github-actions[bot]' and c["body"] == message }
@ -37,5 +39,4 @@ if duplicate
exit(0)
end
message = ARGV.join(' ')
github.add_comment(repo, pr["number"], message)