New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type check jobs #97
Type check jobs #97
Conversation
@@ -26,6 +26,7 @@ def github_jwt | |||
exp: Time.now.to_i + (10 * 60), | |||
iss: ENV["GITHUB_APP_ID"], | |||
} | |||
JWT.encode(payload, OpenSSL::PKey::RSA.new(ENV["GITHUB_PRIVATE_KEY"].unpack1("m*"), ''), "RS256") | |||
pem = ENV.fetch("GITHUB_PRIVATE_KEY").unpack1("m*") #: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed Hash#[]
to Hash#fetch
because the former one returns String?. Additionally, I added the type comment to indicate the return value of String#unpack
is ambigous.
@@ -0,0 +1,3 @@ | |||
class ApplicationJob < ActiveJob::Base | |||
include _RbsRailsPathHelpers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this include
statement to use path helper methods in the Job subclasses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Note: This contains #96