jpmcb / prow-github-actions

Slash commands, jobs, and chat-ops for Github actions inspired by Kubernetes Prow ⚓️
MIT License
92 stars 10 forks source link

Check membership for user using new API #37

Closed Akasurde closed 2 years ago

Akasurde commented 2 years ago

API checkMembership is changed to checkMembershipForUser, modify the code as per this change.

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

Akasurde commented 2 years ago

I am following this https://octokit.github.io/rest.js/v18#orgs

jpmcb commented 2 years ago

Note that prow-github-actions is on an older version of @actions/github which has a dependency on ~v16 of @octokit/rest

This is why the tests failed with

src/utils/auth.ts(24,24): error TS2339: Property 'checkMembershipForUser' does not exist

This would require a much greater overhaul of the project to bring @actions/github up to it's current version. Also note that v17.0.0 of @actions/github had a large number of breaking changes, so this is no small task. I've captured that here: https://github.com/jpmcb/prow-github-actions/issues/38

Using this API also shouldn't cause the /lgtm labeler to fail. I'll look into what's happening in the linked issue and see if I can provide any feedback. Closing for now - feel free to comment with questions!