Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
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

@boanders74

Description

@boanders74

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.

image

I found online someone that used this and that seemed to work for me
const newIssue = await octokit.rest.issues.create({

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions