modify regex for trimming job name

flaky_jobs_to_sentry fails if the specs are not in the
spec/ dir. Modified the regex to not specifically look
for spec/ but rather just remove the ./ at the beginning
and [] at the end.
This commit is contained in:
James Butters 2021-09-09 11:47:56 -06:00
parent fddf75c768
commit b5a638f114
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ module RSpecQ
return if jobs.empty?
jobs.each do |job|
filename = job.sub(/\[.+\]/, "")[%r{spec/.+}].split(":")[0]
filename = job.gsub(/\[.+\]|\.\//, "").split(":")[0]
extra = {
build: @build_id,