1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #8161 duplicate

Email Hook Branch Value Bug

adam hills
created an issue

I've noticed that emails sent out as a result of > 1 commits (in a single push), branch values EXCEPT the last commit are set to none.

This is easily reproduced by doing the following:

  1. Modify file1
  2. git add file1
  3. git commit -m "First commit"
  4. Modify file2
  5. git add file2
  6. git commit -m "Second commit"
  7. git push

The triggered email body content will show 2 new commits, the first of which will have a branch value as none. IF the above files were on master, only the last commit would have this value set.

Comments (8)

  1. adam hills reporter

    Hi Michael,

    Using a hook email body template:

    $Number new commits in $RepositoryName:
    Changeset:   short_SHA1
    Branch:      master/branch_name/tag_value
    User:        user_who_pushed
    Date:        year-month-day 24hour:minute:second
    Summary:     commit_msg
    Affected:  $Number_Of_Files file 
    $Number = total number of commits in push
    $RepositoryName = git cloned repository
    $Number_Of_Files = total number of files affected by this commit

    The 'Branch' appears to be which refs/heads/value we are pushing.

    NOTE: The above template from the https://*/commits/changeset/ URL to the 'Affected' will be added to the email body per commit.

    SO for two commits (both on master) in one push, the first 'Branch' will always be none, the last will be master.

    Is that clear?

  2. Frank Löffler

    This isn't really a duplicate. #5938 is about push requests, and this bug is about commit emails. The problem is that, while there are now new push requests including that information, commit emails using the 'services' settings still show this issue: only the last commit shows the proper branch, all others show 'None'.

  3. Frank Löffler

    To show what I mean, I just got this message (part of it, as it contains a lot of commits):


    https://bitbucket.org/cactuscode/cactus/commits/9594a504af4a/ Changeset: 9594a504af4a Branch: None User: Steven R. Brandt Date: 2016-07-12 22:22:51+00:00 Summary: Latest working changes to using Piraha for compilation

    Affected #: 4 files

    https://bitbucket.org/cactuscode/cactus/commits/0613a6d8efe8/ Changeset: 0613a6d8efe8 Branch: None User: Steven R. Brandt Date: 2016-07-13 19:39:49+00:00 Summary: Add peg for the configuration file

    Affected #: 1 file

    https://bitbucket.org/cactuscode/cactus/commits/5bc2f04308f0/ Changeset: 5bc2f04308f0 Branch: piraha_everywhere User: Steven R. Brandt Date: 2016-07-15 15:52:38+00:00 Summary: Parse all ccl files

    Affected #: 6 files

  4. Log in to comment