Check the permissions of a team for the repository using Octokit

Hello all,

I can’t get the permission that a certain team has for repository.

So far I have used the checkManagesRepoInOrg function, but it is no longer available.
Starting with release 18.0.0, octokit.teams.checkManagesRepoInOrg() has been renamed to octokit.teams.checkPermissionsForRepoInOrg(), so I made this change in my project.

Details about octokit versions

Although I updated my project to the latest version of Octokit, the checkPermissionsForRepoInOrg function cannot be found.

This is the error I receive.

REVIEW-APP Unexpected Failure

Error: TypeError: this.context.github.teams.checkPermissionsForRepoInOrg is not a function

Stacktrace: TypeError: this.context.github.teams.checkPermissionsForRepoInOrg is not a function
at EventContext.getTeamRepositoryPermissionLevel (D:\Git\VED-EBS\review-app\app\dist\modules\event-context.js:756:60)
at Object.getTeamRepositoryPermissionLevel (D:\Git\VED-EBS\review-app\app\dist\modules\review-controller.js:485:68)
at teams.forEachAsync (D:\Git\VED-EBS\review-app\app\dist\modules\commands\add-dynamic-owner-command.js:38:74)
at promise.then (D:\Git\VED-EBS\review-app\app\dist\modules\async-array.js:39:63)

You can find more details in the image below.

Any idea how to solve this ?