Messages in Github pull request notifications are cut off at 500 characters

Yihui Xie's Avatar

Yihui Xie

27 Sep, 2020 02:55 PM

Hi,

I noticed that messages in Github pull request notifications were cut off at 500 characters. Here are two examples:

  1. https://github.com/yihui/latex-pass/pull/5#issuecomment-699593095 with full messages at the end of the build log: https://ci.appveyor.com/project/yihui/latex-pass/builds/35426366#83

  2. https://github.com/yihui/latex-pass/pull/1#issuecomment-699584797 and full messages at https://ci.appveyor.com/project/yihui/latex-pass/builds/35425907#L82

The messages were added via https://github.com/yihui/latex-pass/blob/59253cd/appveyor.yml#L14 And the notification template is:

{{#jobs}}
{{#messages}}
{{message}}
{{/messages}}
{{/jobs}}

I don't know why the messages were cut off, and didn't find documentation about this behavior, so I'm not sure if this is a bug. Thanks!

  1. 1 Posted by Yihui Xie on 27 Sep, 2020 03:09 PM

    Yihui Xie's Avatar

    Actually the messages have already been cut off on AppVeyor's side before they were sent to Github: https://ci.appveyor.com/project/yihui/latex-pass/builds/35426366/me... Sounds like appveyor AddMessage has a limit on the number of characters.

  2. Support Staff 2 Posted by Feodor Fitsner on 28 Sep, 2020 03:46 AM

    Feodor Fitsner's Avatar

    Right, there is a hard limit on 500 symbols for "Message" field, however you can put up to 1,000 symbols into "Details" field.

  3. 3 Posted by Yihui Xie on 28 Sep, 2020 03:59 AM

    Yihui Xie's Avatar

    Thanks for the confirmation! Is there a chance to raise or even remove this limit? If not, I think the limit should be at least documented: https://www.appveyor.com/docs/build-worker-api/

    If I use the "Details" field, how should I use it in the notification template? Does {{message}} contain messages in "Details"?

  4. Support Staff 4 Posted by Feodor Fitsner on 28 Sep, 2020 04:56 AM

    Feodor Fitsner's Avatar

    Try this:

    {{#jobs}}
    {{#messages}}
    {{details}}
    {{/messages}}
    {{/jobs}}
    
  5. 5 Posted by Yihui Xie on 28 Sep, 2020 02:34 PM

    Yihui Xie's Avatar

    Just tested it, and {{details}} worked. Thanks a lot!

  6. Support Staff 6 Posted by Feodor Fitsner on 28 Sep, 2020 04:03 PM

    Feodor Fitsner's Avatar

    Great, thanks for the update!

  7. Feodor Fitsner closed this discussion on 28 Sep, 2020 04:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac