-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint-commit-messages does not work by default on Travis CI #2
Comments
After several hours of trial and error I succeeded in getting before_script:
- git fetch origin refs/heads/master:refs/heads/master
- if [ "$TRAVIS_PULL_REQUEST_BRANCH" ] ; then git checkout -b "$TRAVIS_PULL_REQUEST_BRANCH" ; fi Travis CI performs two checks: |
In the last few sentences you introduce the term |
Indeed. I knew I shouldn't try to explain this at three in the morning! |
I did notice the post' time, yes. ;) |
I understand the solution, but I don't understand the problem.
Do you mean that it fetches only the feature branch? |
If so, then only the initial step of your |
Yes. By default
The two lines serve different purposes: the first creates a local -Merge pull request #999 from fantasyland/HEAD
+Merge pull request #999 from fantasyland/davidchambers/scripts |
But shouldn't this particular commit (the detached head) be ignored by |
The script does two distinct things: lints commits on the pull request branch and lints the prospective merge commit. The second check does not depend on the output of |
Travis CI only checks out the feature branch, so
git log --no-merges --format=%s master..
returns no results.I see two possible solutions:
The text was updated successfully, but these errors were encountered: