Vauxoo / maintainer-quality-tools

QA tools for Odoo maintainers
GNU Affero General Public License v3.0
3 stars 9 forks source link

gitlab is not running the special lint when is a pull request #266

Closed moylop260 closed 6 years ago

moylop260 commented 6 years ago

Travis set the following environment variables

Gitlab works a little different and then these checks are not emitted.

Differences between gitlab and github:

Then maybe we will need to define a environment variable (or use one defined from gitlab) in order to add the remote to target branch. Same case for the target branch.

moylop260 commented 6 years ago

@ruiztulio Any help is welcome here

ruiztulio commented 6 years ago

@moylop260 As for the TRAVIS_BRANCH there is a CI_COMMIT_REF_NAME, it stores the branch name.

To know if you are in a branch we could do one of these two:

Maybe there are other options, but in the documentation there is not a variable specific to know if we are in a MR

luisg123v commented 6 years ago

As mentioned in this Gitlab issue, there are no available variable to access merge request information.

So, I think our best guess is to use something like @ruiztulio 's idea: CI_COMMIT_REF_NAME != VERSION

luisg123v commented 6 years ago

I'd like to know:

moylop260 commented 6 years ago

We have 2 options:

  1. Use gitlab-ci.yml file to translate
  2. Use a MQT script to translate if there is not environment variables of travis.
ruiztulio commented 6 years ago

@moylop260 I think is better to use the MQT script because in this way we'll have it available in all repos instead of changing all the ci files