Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GitHub Actions hazelcast membership check #1007

Conversation

JackPGreen
Copy link
Contributor

We restrict actions' execution to members of the hazelcast organisation using hazelcast/hazelcast-tpm/membership, passing in the user derviced from github.event.pull_request.head.repo.owner.login.

This is the owner of the repository, not the user itself.

In the case of a non-fork PR - i.e. one in the hazelcast original repo - the owner will be hazelcast (which isn't a GitHub user, and isn't a member of the hazelcast organisation) and will fail.

This nuance prevented hazelcast/hazelcast-python-client#720 from being merged.

Instead we should query github.actor as already used in the C++ client.

We restrict actions' execution to members of the `hazelcast` organisation using `hazelcast/hazelcast-tpm/membership`, passing in the user derviced from `github.event.pull_request.head.repo.owner.login`.

This is the owner of the repository, _not_ the user itself.

In the case of a non-fork PR - i.e. one in the `hazelcast` original repo - the `owner` will be `hazelcast` (which _isn't_ a GitHub user, and _isn't_ a member of the `hazelcast` organisation) and will fail.

This nuance prevented hazelcast/hazelcast-python-client#720 from being merged.

Instead we should query `github.actor` as [already used in the C++ client](https://github.com/hazelcast/hazelcast-cpp-client/blame/b63e40748aa8e06f790510d86e1eae87cc36925a/.github/workflows/build-pr.yml#L50).
@JackPGreen JackPGreen requested a review from yuce February 18, 2025 23:16
@JackPGreen JackPGreen enabled auto-merge (squash) February 18, 2025 23:17
@JackPGreen JackPGreen disabled auto-merge February 20, 2025 10:48
@JackPGreen JackPGreen merged commit 5c6f1de into hazelcast:master Feb 20, 2025
5 checks passed
@JackPGreen JackPGreen deleted the remove-github.event.pull_request.head.repo.owner.login branch February 20, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants