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

octokit instance from README examples doesn't work #545

Open
mutantcornholio opened this issue Feb 17, 2025 · 0 comments
Open

octokit instance from README examples doesn't work #545

mutantcornholio opened this issue Feb 17, 2025 · 0 comments

Comments

@mutantcornholio
Copy link

Simple examples like this

            const script = require('./path/to/script.js')
            console.log(script({octokit, context}))

lead to

ReferenceError: octokit is not defined
    at eval (eval at callAsyncFunction (/Users/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:5:3)
    at callAsyncFunction (/Users/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
    at main (/Users/runner/work/_actions/actions/github-script/v7/dist/index.js:355[22](https://github.com/paritytech/revive-workflow-test/actions/runs/13367697259/job/37329093073#step:3:23):26)
    at /Users/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
    at /Users/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
    at Object.<anonymous> (/Users/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:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
Error: Unhandled error: ReferenceError: octokit is not defined

Replacing octokit with github works. Is the README wrong and should be changed to github only, or is it a bug?

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

No branches or pull requests

1 participant