Pipeline triggered by creating a Merge Request via API with a Project Access Token fails when gitlab-ci.yml includes templates from other projects
Reproduction:
- Create private Projects A and B
- In Project A, add a template gitlab-ci.yml file
- In Project B, create a gitlab-ci.yml file that includes the template from Project A and create a job that builds merge requests with a job from that template
- In Project B, create a Project Access Token
- Create a merge request in Project B via the API using the Project Access Token
Expected Result: The pipeline should be able to run
Actual Result: The pipeline fails because the Project Access Token does not have permission to access the template from Project A
Considered Alternatives:
I considered using Deploy Tokens instead and create a merge request while doing a push, but that is limited because it does not allow line-breaks in merge request descriptions and does not allow to add reviewers to the merge request.