Skip to content

Commit

Permalink
Use JSON.parse instead o JSON.load_file for Ruby 2.7 compatbility
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackeus committed Jul 5, 2023
1 parent 3624eea commit 1cfffe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rubocop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def self.request(request_class, path, params = nil)

# Figure out which ruby files have changed and run Rubocop on them

github_event = JSON.load_file(ENV.fetch("GITHUB_EVENT_PATH"))
github_event = JSON.parse(File.read(ENV.fetch("GITHUB_EVENT_PATH")))
pr_number = github_event.fetch("pull_request").fetch("number")
owner_and_repository = ENV.fetch("GITHUB_REPOSITORY")

Expand Down

0 comments on commit 1cfffe6

Please sign in to comment.