Skip to content
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

tools: do not lint commit message if var undefined #23725

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -13,7 +13,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- \[ -z "$TRAVIS_COMMIT_RANGE" \] || git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata

This comment has been minimized.

Copy link
@lpinca

lpinca Oct 18, 2018

Member

I think there is no need to escape [ and ].

This comment has been minimized.

Copy link
@Trott

Trott Oct 18, 2018

Author Member

[ and ] have special meaning in YAML, so I think you do need to escape at least the opening one, but I'm not sure, so let's try...

This comment has been minimized.

Copy link
@Trott

Trott Oct 18, 2018

Author Member

#23741 to test

This comment has been minimized.

Copy link
@Trott

Trott Oct 18, 2018

Author Member

Looks like the result there is malformed YAML and Travis doesn't kick off. Confirmed with https://codebeautify.org/yaml-validator that escaping is needed.

This comment has been minimized.

Copy link
@lpinca

lpinca Oct 19, 2018

Member

You are right, I was tricked by https://github.com/primus/eventemitter3/blob/991b9454dd977cbfb327203a03885c8f721095e3/.travis.yml and many other similar cases but that works because the whole string is wrapped in ''.

- name: "Test Suite"
install:
- ./configure
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.