mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-13 04:58:45 +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() {
|
||||
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 {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue