Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment on pull request workflow is failing (benchmark-report.yml) #16558

Closed
krassowski opened this issue Jul 8, 2024 · 1 comment · Fixed by #16559
Closed

Comment on pull request workflow is failing (benchmark-report.yml) #16558

krassowski opened this issue Jul 8, 2024 · 1 comment · Fixed by #16559

Comments

@krassowski
Copy link
Member

Run actions/github-script@v7
  with:
    script: var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
     owner: context.repo.owner,
     repo: context.repo.repo,
     run_id: 9842740167,
  });
  var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
    return artifact.name == "benchmark-assets"
  })[0];
  var download = await github.rest.actions.downloadArtifact({
     owner: context.repo.owner,
     repo: context.repo.repo,
     artifact_id: matchArtifact.id,
     archive_format: 'zip',
  });
  var fs = require('fs');
  fs.writeFileSync('/home/runner/work/jupyterlab/jupyterlab/benchmark-assets.zip', Buffer.from(download.data));
  
    github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
    retries: 0
    retry-exempt-status-codes: 400,401,40[3](https://github.com/jupyterlab/jupyterlab/actions/runs/9842741235/job/27172343788#step:2:3),404,422
TypeError: Cannot read properties of undefined (reading 'id')
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:14:31)
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'id')
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:20)

https://github.com/jupyterlab/jupyterlab/blob/16887de003e0f7d1f45713370731aafa7047aa99/.github/workflows/benchmark-report.yml

@krassowski krassowski added bug status:Needs Triage Applied to new issues that need triage labels Jul 8, 2024
@krassowski
Copy link
Member Author

I think we may need github.event.workflow_run.conclusion == 'success' back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants