Skip to content

Commit

Permalink
Fix retrieving pr from a Regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 committed Aug 20, 2024
1 parent 8d51112 commit 0b8ca84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tests/formulae_detect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def detect_formulae!(args:)
# Use GitHub Actions variables for pull request jobs.
if github_ref.present? && github_repository.present? &&
%r{refs/pull/(?<pr>\d+)/merge} =~ github_ref

Check failure on line 46 in lib/tests/formulae_detect.rb

View workflow job for this annotation

GitHub Actions / macOS

Lint/UselessAssignment: Useless assignment to variable - `pr`.
url = "https://github.com/#{github_repository}/pull/#{pr}/checks"
url = "https://github.com/#{github_repository}/pull/#{Regexp.last_match(:pr)}/checks"
end
elsif (canonical_formula_name = safe_formula_canonical_name(@argument, args:))
unless canonical_formula_name.include?("/")
Expand Down

0 comments on commit 0b8ca84

Please sign in to comment.