mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -94,15 +94,15 @@ class ArtifactProvider {
|
||||
}
|
||||
async load() {
|
||||
const result = {};
|
||||
const resp = await this.octokit.rest.actions.listWorkflowRunArtifacts({
|
||||
const allArtifacts = await this.octokit.paginate(this.octokit.rest.actions.listWorkflowRunArtifacts, {
|
||||
...github.context.repo,
|
||||
run_id: this.runId
|
||||
});
|
||||
if (resp.data.artifacts.length === 0) {
|
||||
if (allArtifacts.length === 0) {
|
||||
core.warning(`No artifacts found in run ${this.runId}`);
|
||||
return {};
|
||||
}
|
||||
const artifacts = resp.data.artifacts.filter(a => this.artifactNameMatch(a.name));
|
||||
const artifacts = allArtifacts.filter(a => this.artifactNameMatch(a.name));
|
||||
if (artifacts.length === 0) {
|
||||
core.warning(`No artifact matches ${this.artifact}`);
|
||||
return {};
|
||||
|
||||
@@ -50,17 +50,17 @@ export class ArtifactProvider implements InputProvider {
|
||||
async load(): Promise<ReportInput> {
|
||||
const result: ReportInput = {}
|
||||
|
||||
const resp = await this.octokit.rest.actions.listWorkflowRunArtifacts({
|
||||
const allArtifacts = await this.octokit.paginate(this.octokit.rest.actions.listWorkflowRunArtifacts, {
|
||||
...github.context.repo,
|
||||
run_id: this.runId
|
||||
})
|
||||
|
||||
if (resp.data.artifacts.length === 0) {
|
||||
if (allArtifacts.length === 0) {
|
||||
core.warning(`No artifacts found in run ${this.runId}`)
|
||||
return {}
|
||||
}
|
||||
|
||||
const artifacts = resp.data.artifacts.filter(a => this.artifactNameMatch(a.name))
|
||||
const artifacts = allArtifacts.filter(a => this.artifactNameMatch(a.name))
|
||||
if (artifacts.length === 0) {
|
||||
core.warning(`No artifact matches ${this.artifact}`)
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user