reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
44 stars 37 forks source link

Never get more than one from-to line #17

Closed cwoeltge closed 9 years ago

cwoeltge commented 9 years ago

When I push multiple commits in one push I'm always getting only the latest commit message and diff. Reading the test script I would assume the while would return multiple lines, one per commit pushed.

Am I under a wrong assumption or is there some regression?

Setup: Stash 3.1.1, external-hooks 2.0-1

Test script output

Ref update:
 Old value: 2717c66303b3c8f29fdeb00ee26def7d7460aa73
 New value: b032adc546ade3c5be6d717c41e5bf2f51e094cc
 Ref name:  refs/heads/feature/DPDHLUP-123-Slack-integration
 Diff:
...

... where Ref update is always only once, never multiple times. My expectation was to see this once for each commit.

(p.s. thanks for the great hook :)

seletskiy commented 9 years ago

@cwoeltge: hmm... Thanks for the report. I'l check it out soon.

seletskiy commented 9 years ago

@cwoeltge: ok, actually, it's test script that is wrong.

Hook will receive one line per ref updated. However, it can be more than one commit in between of "Old value" and "New value".

Correct implementation of test script should contains git show $from_ref..$to_ref instead of git show $to_ref.

cwoeltge commented 9 years ago

That makes sense than! Thanks for looking into.