intuit/auto

[Question] Detecting PRs from a github repo leveraging gitlab-ci using coqbot as the trigger

jdalrymple opened this issue · 4 comments

Describe the question

To aid in having gitlab run CI pipelines when the github repo receives forked PR's i'm using coqbot, which nicely triggers a pr pipeline in gitlab ci, when ever a pr in github is created/updated. Unfortunately, It does this by updating the mirror repo, which results in not only a different commit sha, but missing env vars used by the env-ci pkg to indicate its a pr. This results in the release notes assuming every release is a patch haha. Worrisome.

So yes, main problem here is 1. How gitlab supports repo mirroring and their ci/cd setup and 2. how coqbot is implemented.

Question is: What is the best way for me to fix this? I was thinking i could set the env vars in the pipeline for the relevant items indicated here: https://github.com/semantic-release/env-ci/blob/master/services/gitlab.js, but I'm not sure if there would be downstream problems within auto that im not aware of. I think i would only need to set the one for the pr and build for it to work, but figured i should inquire first before tinkering.

I'm not sure auto works with gitlab at all. Have you had any success? we depend heavily on the GitHub api

Yup! In the past it had it running fine, Im currently working on getting it back setup. The repo is still on github, im just using gitlab for its ci. I will follow up when i figure out some more from testing 🤞

We use env-ci a package that detects those things for us. maybe there is a bug there?

Yea i managed to figure out something. Basically avoid releasing from the bots pr branch 🤷 not the best solution, but it works