This commit is contained in:
Jozef Izso 2025-12-04 23:02:02 +00:00 committed by GitHub
commit 4243e9eb19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

6
dist/index.js generated vendored
View file

@ -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 {};

View file

@ -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 {}