Skip to content
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

🔨 Please the linter #197

Merged
merged 2 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/models/pull_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def add_comment(text)
# The saved_changes variable includes all the stuff that has changed.
# We currently don't care about them

def validate(saved_changes)
def validate
# Don't run through validation if it's a draft
return if draft

Expand Down Expand Up @@ -194,7 +194,7 @@ def queue_validation

return if saved_changes.empty? && !force

ValidatePullRequestWorker.perform_async(id, saved_changes)
ValidatePullRequestWorker.perform_async(id)
end

def validate_mergeable
Expand Down
4 changes: 2 additions & 2 deletions app/workers/validate_pull_request_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ValidatePullRequestWorker
# This worker is not meant to hold any logic but only trigger the
# validation in its asyncronous context.

def perform(id, saved_changes)
PullRequest.find(id).validate(saved_changes)
def perform(id)
PullRequest.find(id).validate
end
end