Skip to content

Backend: Pipeline not triggering for external pull requests when Github is connected manually

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

One of our customers reported that the pipelines is not triggering twice when using pipelines for external pull requests.

Our documentation states that:

If changes are pushed to the branch referenced by the Pull Request and the Pull Request is still open, a pipeline for the external pull request is created.

GitLab CI/CD creates 2 pipelines in this case. One for the branch push and one for the external pull request.

After some testing it seems that when Github is connected manually GitLab will not trigger the pipeline for external pull requests. It will only trigger the pipeline for pushes.

This doesn't happen when Github is connected using a personal access token.

The customer is experiencing this on GitLab 13.8.6. I was able to reproduce this in GitLab 13.9.0.

Steps to reproduce

  1. Configure pipelines for external pull request using this method: Connect manually
  2. Add a .gitlab-ci.yml file:

stages:
  - test

test:
  stage: test
  script: echo 'Hello world'
  1. Create a new branch and a pull request.
  2. Push a commit to the new branch.
  3. Only one pipeline is triggered.

Example Project

Happens on GitLab 13.8.6 (customer's version) and GitLab 13.9.0 (my test instance)

What is the current bug behavior?

Only one pipeline is triggered. Only the pipeline for the push is triggered.

What is the expected correct behavior?

Two pipelines should be triggered. One for the push and another for the pull request.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖