Vauxoo / maintainer-quality-tools

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

[FIX] test_pylint: Retrieve correctly changed modules on GitLab CI #289

Closed luisg123v closed 6 years ago

luisg123v commented 6 years ago

Currently, when tests are run on GitLab CI, list of changed modules are not retrieved correctly. They are computed comparing changes against origin/base_branch (e.g. origin/11.0). However, on GitLab CI, origin doesn't contain the base branch, but the head branch (e.g. vauxoo-dev/maintainer-quality-tools, not Vauxoo/maintainer-quality-tools).

This commit computes changed files taking changes from the most recent commit. Since there's no way to know the base/target branch, thus there's no way to know for sure what files were modified, our best bet is to compare changes against HEAD~1, and hope the MR doesn't contain more than one commit.

Closes #271

Dummy MRs:

luisg123v commented 6 years ago

@moylop260
Could you review this, please?

Note:
Dummy MRs are red, but they are expected errors, both contain lint issues in non-excluded modules, so this is working as it should.