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

Updating github rest api calls #57

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

KaushikMalapati
Copy link
Contributor

Error in action - https://github.com/pcdshub/pcds-nalms/actions/runs/12422868845/job/34685382260#step:2:28

TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:3:38)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
    at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:26)
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35556:12)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1[28](https://github.com/pcdshub/pcds-nalms/actions/runs/12422868845/job/34685382260#step:2:29)8:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)

Solution found in - actions/github-script#242

In V5 of this action, we upgraded Octokit and REST methods now need to be referenced by github.rest - https://github.com/actions/github-script#breaking-changes-in-v5

This should be github.rest.actions.listWorkflowRunArtifacts rather than github.actions.listWorkflowRunArtifacts

@KaushikMalapati KaushikMalapati marked this pull request as ready for review December 20, 2024 00:54
Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the infinite incarnations of this I feel like I did this. Whoops

@tangkong tangkong merged commit 96981e3 into pcdshub:master Dec 20, 2024
1 check passed
@KaushikMalapati KaushikMalapati deleted the makecomment branch December 22, 2024 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants