-
Notifications
You must be signed in to change notification settings - Fork 76
Add --commits command line option #60
Comments
I'd like to use this feature. I'm willing to contribute, but would probably need some pointers on what would be the best way to approach this. |
I did some research, but I'm not sure this will be easy. |
Hi I am interested in this, more specifically in allowing the user to pass in a range of commits. I have a version of the code which works with a new argument @sk- I don't have much knowledge of mercurial so I am not adding that feature there. If you still take PRs I'll send you one in a couple days. |
@YBadiss mind sharing your solution? I'm looking for something that will fail CI builds if there's lint in the changeset. |
@mistercrunch I found a supremely kludgy approach to using git-lint to fail CI if there's new lint in a PR. I accomplished it by means of a Make target which stores the current commit hash, does a git soft reset back to the latest common ancestor of the branch in the PR and origin/master, runs the linter (since all the changes from the commits in the PR are now staged), then resets back to the current commit.
This works on CI (tested on CircleCI), and locally as well. I'm still a little suspicious of what I'm doing with the git resets, but in my testing, it seems to be just fine. Let me know if this approach works for you! |
Also, @YBadiss if you wouldn't mind sharing your --since-commit solution, that'd be super helpful, because with it perhaps ^ would no longer be necessary :) |
For the ones looking on how to integrate Basically you do:
A similar approach could be done in Circle CI using the environment variable |
The feature of accepting commits or a commit range is feasible and most of the infrastructure is already there. The The main change required would be to change Also we would need to double check whether the same approach applies for mercurial, if not the flag should work only for git. |
@jombooth just saw this, since then a lot happened and somehow I never pushed that change anywhere. Will look into it again soon. |
@sk- I've got something working that uses If you wanted everything on branch
If you wanted a commit range
Basically if it works with |
For CI, it would be great to have a
--commits
options that allows one to specify a comma separated list of commits id to track.The text was updated successfully, but these errors were encountered: