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
Describe the bug
A method, which should be available according to the documentation of octokit, does not exist.
I get error Unhandled error: TypeError: github.orgs.cancelInvitation is not a function.
Other like github.orgs.listPendingInvitations works as expected.
The endpoint was added upstream via octokit/plugin-rest-endpoint-methods.js#320 in January (v4.6.0) 😞 #133 is also caused by outdated dependencies. However, I tried to bump everything to latest but it's still missing the methods for some reason - am I doing something wrong?
Found the problem: Octokit used to expose REST endpoints directly, like octokit.actions.cancelWorkflowRun. They are now nested under octokit.rest, e.g. octokit.rest.actions.cancelWorkflowRun. My updated github-script action works if I use github.rest.* instead of github.*.
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.
Activity
Simran-B commentedon Jun 25, 2021
The endpoint was added upstream via octokit/plugin-rest-endpoint-methods.js#320 in January (v4.6.0) 😞
#133 is also caused by outdated dependencies. However, I tried to bump everything to latest but it's still missing the methods for some reason - am I doing something wrong?
Simran-B commentedon Jun 25, 2021
Found the problem: Octokit used to expose REST endpoints directly, like
octokit.actions.cancelWorkflowRun. They are now nested underoctokit.rest, e.g.octokit.rest.actions.cancelWorkflowRun. My updatedgithub-scriptaction works if I usegithub.rest.*instead ofgithub.*.github-actions commentedon Aug 28, 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.
Timmmy-nlb commentedon Aug 30, 2021
Is there anything I can do or test so that we can continue this issue?
joshmgross commentedon Sep 24, 2021
👋 Hey @Timmmy-nlb,
I've just released https://github.com/actions/github-script/releases/tag/v5.0.0 which includes the latest version of Octokit with this API.
Note you'll need to update your script to use
github.rest.orgs.cancelInvitationdue to changes in Octokit, see https://github.com/actions/github-script#breaking-changes-in-v5.Feel free to reopen this issue if you're still seeing issues.