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 be6b135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tests/formulae_detect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def detect_formulae!(args:)
@testing_formulae = []
# Use GitHub Actions variables for pull request jobs.
if github_ref.present? && github_repository.present? &&
%r{refs/pull/(?<pr>\d+)/merge} =~ github_ref
url = "https://github.com/#{github_repository}/pull/#{pr}/checks"
%r{refs/pull/(?:\d+)/merge} =~ github_ref
url = "https://github.com/#{github_repository}/pull/#{Regexp.last_match(1)}/checks"
end
elsif (canonical_formula_name = safe_formula_canonical_name(@argument, args:))
unless canonical_formula_name.include?("/")
Expand Down

0 comments on commit be6b135

Please sign in to comment.