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 }}
Repository navigation
TypeError: github.repos.createOrUpdateEnvironment is not a function - Octokit.js Support up-to-date? #133
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.
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
We're dealing with a similar issue, where we get a TypeError: github.repos.deleteAnEnvironment is not a function (but github.repos.createDeploymentStatus in the immediately prior job step succeeds)
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
Hello I'm also experiencing this issues with "github.repos.deleteAnEnvironment is not a function", which is frustrating as we're trying to clean up environments we create per PR.
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.
Activity
github-actions commentedon Jun 12, 2021
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
Simran-B commentedon Jun 13, 2021
Just ran into a similar issue:
Error: Unhandled error: TypeError: github.actions.getEnvironmentPublicKey is not a functionSeveral functions were added to Octokit here: octokit/octokit.js#2025
I suppose
github-scriptneeds to bump its dependencies?Simran-B commentedon Jun 25, 2021
I got it to work with a modified version of this action (bumped deps):
dcousineau-godaddy commentedon Jul 15, 2021
We're dealing with a similar issue, where we get a
TypeError: github.repos.deleteAnEnvironment is not a function(butgithub.repos.createDeploymentStatusin the immediately prior job step succeeds)github-actions commentedon Sep 18, 2021
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
IronSean commentedon Sep 21, 2021
Hello I'm also experiencing this issues with "
github.repos.deleteAnEnvironmentis not a function", which is frustrating as we're trying to clean up environments we create per PR.IronSean commentedon 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-testfor now if they'd like.joshmgross commentedon 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.createOrUpdateEnvironmentdue to breaking changes in Octokit, see https://github.com/actions/github-script#breaking-changes-in-v5