question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: github.repos.createOrUpdateEnvironment is not a function - Octokit.js Support up-to-date?

See original GitHub issue

Is your feature request related to a problem? Please describe. Trying to use github-script for environments but getting this error message: TypeError: github.repos.createOrUpdateEnvironment is not a function

Describe the solution you’d like Would you all be able to update the version of Octokit.js that supports Repo Environments

Describe alternatives you’ve considered Using actions to post the HTTP response for environment creation

Additional context Add any other context or screenshots about the feature request here. image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
joshmgrosscommented, Sep 24, 2021

👋 This should now be fixed in v5 of this action - https://github.com/actions/github-script/releases/tag/v5.0.0

You’ll need to use github.rest.repos.createOrUpdateEnvironment due to breaking changes in Octokit, see https://github.com/actions/github-script#breaking-changes-in-v5

0reactions
IronSeancommented, Sep 22, 2021

I dug into it and saw that the oktokit versions in this action were very out of date, meaning they didn’t expose many newer REST edpoints. I’ve bumped them up in #191 as far as they can go without breaking changes, and anyone can test it with action ironsean/github-script@v-test for now if they’d like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

octokit/rest.js
All endpoint methods starting with .list* do not return all results at once but instead return the first 30 items by default, see...
Read more >
How to use octokit (github API) in node js application
I am trying to use github api to create a repository. I have used octokit as specified in the ... TypeError: Octokit is...
Read more >
GitHub Automation with Octokit (with Gregor Martynus)
GitHub has powerful APIs, and with Octokit we can do just about anything on GitHub through code. Gregor Martynus will teach us how!...
Read more >
GitHub Automation with Octokit - Learn With Jason
DocsGitHub.com. We're in the REST API and we would be looking for our endpoints and we would want to update. Repo, repository. It's...
Read more >
octokit - npm
The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno. ... By default, the Octokit API client supports authentication using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found