mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
parent
ee446707ff
commit
a79abde936
2 changed files with 6 additions and 6 deletions
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
|
|
@ -94,15 +94,15 @@ class ArtifactProvider {
|
||||||
}
|
}
|
||||||
async load() {
|
async load() {
|
||||||
const result = {};
|
const result = {};
|
||||||
const resp = await this.octokit.rest.actions.listWorkflowRunArtifacts({
|
const allArtifacts = await this.octokit.paginate(this.octokit.rest.actions.listWorkflowRunArtifacts, {
|
||||||
...github.context.repo,
|
...github.context.repo,
|
||||||
run_id: this.runId
|
run_id: this.runId
|
||||||
});
|
});
|
||||||
if (resp.data.artifacts.length === 0) {
|
if (allArtifacts.length === 0) {
|
||||||
core.warning(`No artifacts found in run ${this.runId}`);
|
core.warning(`No artifacts found in run ${this.runId}`);
|
||||||
return {};
|
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) {
|
if (artifacts.length === 0) {
|
||||||
core.warning(`No artifact matches ${this.artifact}`);
|
core.warning(`No artifact matches ${this.artifact}`);
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
|
|
@ -50,17 +50,17 @@ export class ArtifactProvider implements InputProvider {
|
||||||
async load(): Promise<ReportInput> {
|
async load(): Promise<ReportInput> {
|
||||||
const result: 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,
|
...github.context.repo,
|
||||||
run_id: this.runId
|
run_id: this.runId
|
||||||
})
|
})
|
||||||
|
|
||||||
if (resp.data.artifacts.length === 0) {
|
if (allArtifacts.length === 0) {
|
||||||
core.warning(`No artifacts found in run ${this.runId}`)
|
core.warning(`No artifacts found in run ${this.runId}`)
|
||||||
return {}
|
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) {
|
if (artifacts.length === 0) {
|
||||||
core.warning(`No artifact matches ${this.artifact}`)
|
core.warning(`No artifact matches ${this.artifact}`)
|
||||||
return {}
|
return {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue