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

The #success in message doesn't work? #34

Closed
alber70g opened this issue Apr 25, 2017 · 2 comments
Closed

The #success in message doesn't work? #34

alber70g opened this issue Apr 25, 2017 · 2 comments

Comments

@alber70g
Copy link
Contributor

I feel like the #success in the message doesn't work. It should be a kind of 'if-statement' but it doesn't seem to work. I've tried the example given in the docs, but I think something is wrong.

This is my config right now:

  telegram:
    image: appleboy/drone-telegram
    token: ${DRONE_BUILD_BOT_TOKEN}
    to: ddddddd
    message: |
      {{ #success build.status }}
        build {{ build.number }} succeeded. Good job.
      {{ else }}
        build {{ build.number }} failed. Fix me please.
      {{ /success }}
    when: 
      status: [ success, failure ]

The error I get:

Parse error on line 1:
Lexer error
Token: Error{"Unexpected character in expression: '#'"}
alber70g added a commit to alber70g/drone-telegram that referenced this issue Apr 26, 2017
@alber70g
Copy link
Contributor Author

Apparently it should be {{#success build.status}} instead of {{ #success build.status }}.

@appleboy
Copy link
Owner

closed via #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants