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

Status checks do not run for PR submitted from forks #621

Closed
istandre opened this issue Jan 20, 2024 · 0 comments · Fixed by #622
Closed

Status checks do not run for PR submitted from forks #621

istandre opened this issue Jan 20, 2024 · 0 comments · Fixed by #622
Labels
bug Something isn't working

Comments

@istandre
Copy link
Contributor

Describe the bug
When a contributor submit a pull request from a fork, workflows do not run which prevents the PR to gets merged.

Here is an example: #620

To Reproduce

  1. Fork the repo to your own account.
  2. Make a change.
  3. Commit and push your changes to your fork.
  4. Open a pull-request with your branch.
  5. Wait for a team member approves your changes

Workflows will never get triggered, and their status will remain in this state: Expected — Waiting for status to be reported .

Expected behavior

Workflows start after a team member approves the PR.

Vesion (please complete the following information):

N/A

Additional context

My guess would be that in the project settings, the branch protection rules is enabled. For a collaborator to be able to push in main, both the backend and frontend CI need to succeed.

Also, workflows on PR from outside contributors might not run automatically, and might need to be approved first. After being approved, the workflows will then get triggered.

However, both jobs only run on push. See pythonci.yml#L4 and webapp_ci.yml#L4. Since those PR come from forks, no push events can trigger the workflows and upon approval, workflows will not start since they only do for push events.

Assuming that this is reason of the issue, I think that adding the pull_request event to the workflow files might fix this issue. You might also want to add the pull_request_target event to trigger workflows (which will run in the context of the main branch) regardless of approval status.

For the latter, you can have a look at Controlling changes from forks to workflows in public repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant