Skip to content

Allow GitLab Runner to fetch references under `refs/pull/*` if ENV variable is set

Patricio Cano requested to merge AlloyCI/alloy-runner:master into master

What does this MR do?

It allows the runner to fetch the Git references that are stored under refs/pull/:pull_request_id/* if the ENV variable EXTERNAL_SERVICE is set to true. This allows the runner to checkout commits stored under this reference.

Why was this MR needed?

AlloyCI uses the GitLab Runner to run pipelines for GitHub repositories.

GitHub stores the commit references under refs/pull/:pull_request_id/*, so if AlloyCI wants to also create and run pipelines for pull requests coming from forks, this small change is needed.

https://github.com/AlloyCI/alloy_ci

Does this MR meet the acceptance criteria?

  • Documentation not needed
  • Tests
    • 2 unit tests
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)
Edited by Patricio Cano

Merge request reports