Autocompleting your @username mentions

By on December 21, 2012

Did you know that you can use @mentions when commenting on commits, pull requests, and issues to get the attention of your teammates?

When a user is mentioned they will receive an email letting them know their attention is needed on Bitbucket. We often use mentions in pull requests to let other devs know we would like feedback on a particular change.

We’ve been noticing a problem though: as the number of developers at Atlassian has grown (300+), we’ve found it difficult to keep track of who has which username when leaving a comment.

You autocomplete me…

Simply type @ to start finding any user on Bitbucket, especially members of your team, without having to know their Bitbucket username.

Bitbucket will remember the users you have most recently mentioned and highlight those users who are in any team you are a member of. You can also quickly see when you or your teammates have been mentioned and click-through to their user profile.

Cursores.js: putting the ‘complete’ in ‘autocomplete’

As part of building autocomplete for mentions, we’ve open-sourced a new library, Cursores.js, which allows you to get and replace the token under the cursor in a textarea or input.

  • http://neithere.net/ Andy

    This is nice in theory, but *please* don’t turn on autocompletion at least in code blocks while composing issues. It’s a horrible experience when you are trying to write a Python decorator and have to fight this thing.

    • Nicolas Venegas

      I’ll work on a fix to disable it inside code blocks. For the moment, pressing escape on your keyboard when the suggestions appear will hide them until the next time you type in an ‘@’.

    • Nicolas Venegas

      Mention suggestions are now disabled in code blocks (within triple-backtick blocks and on lines starting with four spaces).

      If you have any other issues around that, please lets us now on https://bitbucket.org/site/master/issue/5851/

      • http://neithere.net/ Andy

        Thanks a lot!

  • Chris

    Err… I’ve been working on a private project where there is only one ‘Chris’, therefore I’ve tagged all my commits with ‘@chris’. Now, suddenly, I’m Chris Drew. How do I turn this off – it’s more than annoying.

    • Nicolas Venegas

      We will have a fix out next week that disables rendering of ‘@username’ strings in commit messages. Those strings will only be rendered with a user’s name in comments and issue and pull request descriptions.

  • f__ck_you_very_much

    NO THANK YOU Please do not add functionality to my account without permission. Who says I WANT this junk? And how do I remove it, please?

  • http://www.mode7james.com James Allen

    Is there a way to restrict the users list to only people that are already members of your team? I don’t want someone in my team accidentally giving a random user access just because they have similar names. Please give us a way to modify this feature, thanks.

  • @markstein

    Nice feature, thx.

  • Sebastian Morkisch

    @google-283225c91c158f3a10927e9d76a71be7:disqus Thanks so much. Great.

  • http://www.facebook.com/DataGreed Alexey Strelkov

    omg, it so BUGGY AS HELL. Why does it show random people instead of my team?!