mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Fix regex parsing in artifact-provider
This commit is contained in:
parent
075144b122
commit
064a15c405
3 changed files with 9 additions and 3 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -45,7 +45,10 @@ class ArtifactProvider {
|
|||
this.sha = sha;
|
||||
this.runId = runId;
|
||||
if (this.artifact.startsWith('/')) {
|
||||
const re = new RegExp(this.artifact);
|
||||
const endIndex = this.artifact.lastIndexOf('/');
|
||||
const rePattern = this.artifact.substring(1, endIndex);
|
||||
const reOpts = this.artifact.substring(endIndex + 1);
|
||||
const re = new RegExp(rePattern, reOpts);
|
||||
this.artifactNameMatch = (str) => re.test(str);
|
||||
this.getReportName = (str) => {
|
||||
const match = str.match(re);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue