Issue #8223 open

The message in commit hook is not full commit message. (BB-9435)

poshboytl
created an issue

For example the full message is:

resolved #774. When an user update his name, the assignee dropdown should be updated correctly too. The compare function in User/Iteration class follows the rules: 1. If the uid is the same, return zero. 2. Else, order by name So if name updated, we can't find the old pos unless we use the old name. The current solution is to iterate the whole list to find the match using uid and then update the name.

but the hook gave our server is:

"resolved #774. When an user update his name, the assignee dropdown should be ..."

Is this a feature or a bug? I think it's better to give full message to user. Then user can decide how long they needed.

Comments (13)

  1. poshboytl reporter

    Hey Brian,

    Thanks for reply.

    We don't do the truncation in our server.
    
    I notice that your message didn't contain enter.
    
    Would you please try a multi-line comments to reproduce this?
    

    Thanks

    Cheers, Terry

  2. Dingding Ye

    Hey Brian.

    The commit message I included is as follows.

    resolved #774. When an user update his name, the assignee dropdown should
    be updated correctly too.
    
    The compare function in User/Iteration class follows the rules:
    

    The related data I received in the log is

    \"raw_node\": \"5fe257549c5113306f08bb64cd2e4cc46a1bb406\", \"message\": \"resolved #774. When an user update his name, the assignee dropdown should\\nbe ...\", \"size\": -1, \"author\": \"dingding\"
    

    So I suppose the message is truncated in hook side? Please let me know what else I can provide to help troubleshoot this issue. Thanks!

  3. Dingding Ye

    Hey Brian.

    I meet the problem again and defnitely we're using the POST hook. The whole data I received is :

    Processing by HooksController#create as HTML
      Parameters: {"payload"=>"{\"repository\": {\"website\": \"\", \"fork\": false, \"name\": \"fuddle\", \"scm\": \"git\", \"owner\": \"dingding\", \"absolute_url\": \"/dingding/fuddle/\", \"sl
    ug\": \"fuddle\", \"is_private\": true}, \"truncated\": false, \"commits\": [{\"node\": \"b4e598ce9ed6\", \"files\": [{\"type\": \"modified\", \"file\": \"app/assets/stylesheets/dashboard.css
    .less\"}, {\"type\": \"modified\", \"file\": \"app/views/dashboard/index.html.erb\"}, {\"type\": \"modified\", \"file\": \"app/views/layouts/_shortcuts_help.html.erb\"}, {\"type\": \"modified
    \", \"file\": \"app/views/layouts/dashboard.html.erb\"}, {\"type\": \"modified\", \"file\": \"app/views/shared/_chrome_frame.html.erb\"}, {\"type\": \"modified\", \"file\": \"lib/assets/javas
    cripts/draggable.coffee\"}], \"branch\": \"849_support_ie10\", \"utctimestamp\": \"2013-10-17 07:11:40+00:00\", \"timestamp\": \"2013-10-17 09:11:40\", \"raw_node\": \"b4e598ce9ed655bbbe311a5
    0ad3b3cefb185f1ec\", \"message\": \"resolved #849. Directly support IE10, instead of using Chrome Frame.\\n\\nThe onl...\", \"size\": -1, \"author\": \"dingding\", \"url\": \"https://bitbucke
    t.org/dingding/fuddle/changeset/b4e598ce9ed6\", \"parents\": [\"f0140117a3dd\"], \"raw_author\": \"Dingding Ye <yedingding@gmail.com>\", \"revision\": null}], \"canon_url\": \"https://bitbuck
    et.org\", \"user\": \"dingding\"}", "token"=>"xxxxxx", "project_id"=>"xxxxxx"}
    

    The message I committed is

    commit b4e598ce9ed655bbbe311a50ad3b3cefb185f1ec
    Author: Dingding Ye <yedingding@gmail.com>
    Date:   Thu Oct 17 15:11:40 2013 +0800
    
        resolved #849. Directly support IE10, instead of using Chrome Frame.
    
        The only thing we doesn't support is the desktop notification now which
        can use plugin https://github.com/ttsvetko/HTML5-Desktop-Notifications.
    
        However, I don't think we should do that now because the percentage of
        IE10 users in our system is low. We can add desktop notification support
        till users are complaining that.
    

    Please let me know what others should I provide? Thanks.

  4. Dingding Ye

    BTW, we're having the hipchat hook too. The message received in HipChat is correct. However, there are something wrong with the data posted to our app.

  5. Dingding Ye

    Hey Brian.

    Thanks for the guide. It's really a weird issue. The data in posttestserver is at http://www.posttestserver.com/data/2013/10/18/07.50.38893178740 So you can see it contains all the messages. However, what my server received is truncated one.

    And then I manually used curl to post the data to my app endpoint using what copied from the posttestserver. It works as expected.

    It's weird and I don't know what should do next. Please suggest, thanks.

    Dingding

  6. Dingding Ye

    BTW, below is the data what I received from the HipChat hook. The message is also truncated.

    dingding committed to 1 branch at /dingding/fuddle/
    On branch "856_uncompleted_tickets_count_in_sidebar"
    - resolved #856. The counter in the sidebar should show the count of open ticke... (7ea4f3a6358b)
    
  7. Brian Nguyen staff

    Thanks for you patience. We think it may be the Hipchat hook that is truncating the payload before it is sent by the POST hook. To confirm can you try removing the Hipchat hook and see how it goes?

    I'll take a look and see if I can fix it on our end.

  8. Log in to comment