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

Permissions on the fork causes PR to end up as "Failure" #380

Open
KanerLev opened this issue Dec 6, 2023 · 7 comments
Open

Permissions on the fork causes PR to end up as "Failure" #380

KanerLev opened this issue Dec 6, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@KanerLev
Copy link
Collaborator

KanerLev commented Dec 6, 2023

Creating a fork of the original repo and then creating a PR based on that fork fails the tests and end up as "Failure": it causes an error in the build process possibly due to permissions on the fork.
On the other hand, regardless of the "Failure", it's possible to merge it successfully (PR 357 was an example).

@KanerLev KanerLev added the enhancement New feature or request label Dec 6, 2023
@KanerLev KanerLev changed the title Permissions on the fork causes issues when merging Permissions on the fork causes PR to end up as "Failure" Dec 7, 2023
@Pratichhya
Copy link
Collaborator

Though you can create a PR, it fails through the action, and it was maintained for security purposes so that only contributors from the team list can maintain the documentation or make changes. However, suggestions are accepted from all the users, and modifications should be made accordingly.

So, with this issue, we will want to look into how to prevent the merge for PR created with forks?

@soxofaan
Copy link
Collaborator

the action, and it was maintained for security purposes so that only contributors from the team list can maintain the documentation or make changes.

I'm not sure I understand what you mean here. You don't need github actions to manage permissions, e.g. who has right to commit or merge something on main, you do that through the repository settings (collaborators, branch protection rules, ...)

we will want to look into how to prevent the merge for PR created with forks?

unless I'm misunderstanding what you mean here, in github it's impossible for outside users with a fork to merge their fork/branch/PR into the main repository anyway, so what are you trying to prevent here?

@Pratichhya
Copy link
Collaborator

we will want to look into how to prevent the merge for PR created with forks?

unless I'm misunderstanding what you mean here, in github it's impossible for outside users with a fork to merge their fork/branch/PR into the main repository anyway, so what are you trying to prevent here?

I am sorry for not being clear, I was trying to understand myself, what do we want to achieve from this issue?

@Pratichhya
Copy link
Collaborator

the action, and it was maintained for security purposes so that only contributors from the team list can maintain the documentation or make changes.

I'm not sure I understand what you mean here. You don't need github actions to manage permissions, e.g. who has right to commit or merge something on main, you do that through the repository settings (collaborators, branch protection rules, ...)

Ahh, I am sorry, in that case, it's a lack of understanding, as I only knew that we don't allow merging PR from a forked repository in this repo.

@KanerLev
Copy link
Collaborator Author

Apologies if the original issue wasn't clear. It meant to ask: does a github user with the role "Write" on eu-cdse/documentation, able to fork, make changes (to for example API.md) and finally merge without Failures?

Background:
For PR 357, the user either was not afilliated in any way with eu-cdse/documentation or they had the role "Read" when they forked and tried to merge: this resulted in "Failure". Which is expected behaviour.
At this point "Write" role is assigned to the user and I (not the user themselves) "Re-run all jobs". This again resulted in "Failure".

To sum, I reckon, if we can replicate forking and merging with a new user that has the "Write" role, we'll find the answer to this issue.

@Pratichhya
Copy link
Collaborator

a test to show that even if you have write rights to this repo, if you create a PR from your own repo instead of a branch it will not pass through the github action:
#404

@Pratichhya
Copy link
Collaborator

Therefore based on internal discussion, the issue we want to resolve with this PR is to figure out the cause of the test failure. And implement a solution to enable user to create PR's even from the forked repo.

@KanerLev KanerLev self-assigned this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants