Hook to reply to a comment?

Mike Kessler February 26, 2014

I'd like to write a hook that will reply to a comment if the ID is referenced in a commit message. Is this possible?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2014

Hi Mike,

Have you seen the PullRequestService.addReply() method? Unfortunately you're going to need to also know the pull request that the comment is related to, which would have to mentioned in the commit message as well.

Charles

Mike Kessler February 27, 2014

Awesome! I was able to build my plugin with it. Now to submit a feature request that stash make comment id's more readable... :)

Thanks for the reference!

Mike Kessler March 4, 2014

Charles- one question - do you know hwy the addReply method requires the pull request number? It seems like comment id increases regardless of the pull request it is in.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2014

Hi Mike,

It's about publishing activity and events. We have two tables - comments and pull request comments. The comment id is global, which is why it increases, but we also add a pull request activity to be visible on the overview.

Charles

TAGS
AUG Leaders

Atlassian Community Events