Running miq-bot in my own repo without infrastructure


Hi there,

We are trying to make some developments in MIQ, and we would like to work in the following way:

  • We have a fork where we have created a new branch
  • We all code against that branch, with our own forks. In order to merge into that branch, that is protected, we are using checks from travis
  • Once the code is clean and approved, we will create a PR from the branch to master in ManageIQ.

I’ve seen that once we do the PR, miq-bot will run rubocop and haml-lint against the PR diff. If I do that in my laptop, it is run against the full code and I get a lot of errors not in my PR.

I was wondering if it would be possible to use miq-bot to do the same in our repo, but as I understand you need to have some infrastructure to run it inside.

Is there a better way?


We could technically run the rubocop checker against your fork, but I think if there’s a way to run Rubocop against only the diff locally it would be more appropriate. (I think there is, but I don’t recall how)


It sounds like you just want to run the linters, and not necessarily the whole bot. There are two separate things I know of that developers use for local git-based linting that might be helpful. I’m not sure about haml-lint, but perhaps @himdel knows some tools?


Yup, haml-lint can be useful for hamls, and we also use eslint for JavaScript (npm install -g eslint-cli globally, npm install and eslint in manageiq/).

But no idea how to make all these tools check just the changed parts, other than taking that logic from miq-bot.

EDIT: … aah, murphy does that, and as @durandom mentions, so does rubocop-git


Yes, I’ve run rubocop and haml-lint against my code… and got the full set of tests run.

I will try with murphy and rubocop-git