You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
octokit.issues.create didn't work for me. Error Cannot read property 'create' of undefined #36
The lesson says to use this code
const github = require("@actions/github");
const octokit = new github.getOctokit(token);
const newIssue = await octokit.issues.create({
but the create seemed to always fail with this error below.
I found online someone that used this and that seemed to work for me
const newIssue = await octokit.rest.issues.create({
I had this issue too. v5.0.0 of @actions/github seems to have added .rest to the method call. (presumably this is due to a change in octokit/rest.js, but I didn't look that up)
Activity
markpatterson27 commentedon Jul 6, 2021
I had this issue too. v5.0.0 of @actions/github seems to have added
.restto the method call. (presumably this is due to a change in octokit/rest.js, but I didn't look that up)gessnersn commentedon Sep 20, 2021
+1 stumbled into the same issue today
jckling commentedon Apr 1, 2022
Same problem, have to add
.rest.