Github pull request not triggering pipeline in Gitlab

I have a gitlab project that mirrors a GitHub repo to run CI. Right now It runs whenever I push to a branch on GitHub. Mirroring, CI, and status checks in the external PR are all working great.

Now I am trying to create a job that only runs on the ‘master’ branch or when part of a GitHub pull request.

The job has an only section with external_pull_requests as described here: https://docs.gitlab.com/ee/ci/yaml/#onlyexcept-basic

Unfortunately, when I open a pull request on GitHub, it does not seem to trigger a pipeline in GitLab. My expectation is that the act of opening a pull request would trigger a pipeline, and within that pipeline jobs with external_pull_requests in their only section would run.

At this point, I am not sure how to debug the issue. Does anyone know where I should look to understand why opening a pull request is not triggering a gitlab pipeline, or is that not how this works?

Thank You,
Pete

Hi,

mirroring a repository only does the “git side” here, with cloning the commit history, tags, etc.

A Pull Request is an addon from GitHub whose event is not synced in any ways. Therefore you’ll need a little more to trigger the GitLab CI. There’s a feature available in EE making this happen: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html

When GitHub made their actions publicly available, I’ve found this project which might be able to help here as well: https://github.com/marketplace/actions/trigger-gitlab-ci I did not test it yet though.

Cheers,
Michael