travis-ci / travis-yaml

parses, normalizes, validates and serializes your .travis.yml
http://yaml.travis-ci.org/
MIT License
170 stars 66 forks source link

Unexpected keys apt, elapsed_time and on_pull_requests #121

Open cas-- opened 7 years ago

cas-- commented 7 years ago

Although below config snippet works on Travis, running it through the linter results in:

    in notifications.slack.template section: unknown template variable elapsed_time
    in notifications.slack section: unexpected key on_pull_requests, dropping
    value for addons section is empty, dropping
    in addons section: unexpected key apt, dropping
language: python

addons:
  apt:
    packages:
    - aspell

notifications:
  slack:
    rooms:
      - secure: abc
    on_pull_requests: false
    template:
      - "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository}@%{branch} in PR <%{pull_request_url}|#%{pull_request_number}> by %{author} %{result} in %{elapsed_time}"
ntwb commented 7 years ago

I was about to report the addons issue, I'll piggy back this onto this issue here:

The docs at https://docs.travis-ci.com/user/installing-dependencies/#Adding-APT-Packages state:

addons:
  apt:
    packages:
    - cmake
    - time

So the linter or the docs should be updated

thomaseizinger commented 6 years ago

Same thing for the notifications.slack section. The syntax is described here: https://docs.travis-ci.com/user/notifications/#Notifications-of-PR-builds The link links to the hipchat section but I think the configuration is the same for any channel.