Add repo level configuration item to disable online editor (BB-9393)

Issue #8242 open
Steve Muskiewicz
created an issue

Our development environment has some requirements as far as source code checking/formatting and test automation.

As such, we would like to avoid giving anyone the option of using the Bitbucket online editor to directly edit files in the remote repo.

Would it be possible to add a repo-level configuration setting to disable the online editor in all places (source tab, pull requests, any other source viewers) where it is normally available for that repo?

Comments (16)

  1. Brian Nguyen

    Hi Steve,

    Thanks for raising an issue with us. I have added this to our backlog, however so that we can better understand the issue, could you tell us how your environment protects agains checking/formatting and tests? For example, Do you run pre-commit hooks on each developers' machine?

    The reason why I am asking, is to see if this issue is actually part of a larger feature request.

    Cheers, Brian

  2. Steve Muskiewicz reporter

    Hmmm...I guess replying to this issue via email didn't actually work so here's the text of my reply again for the record:

    Hi Brian,

    Thanks for getting back so quickly.

    We're not actually using any pre-commit hooks or anything linked with Git, just some plugins in our Spring Tool Suite (ie. eclipse) IDE. (Checkstyle is one and there may be a couple others)

    Plus some of our developers are still learning Git so having something that actually changes a file contents on a remote branch is another potential point of confusion we'd like to avoid.

    Let me know if you have any other questions

    Cheers, -steve

  3. David Watson

    I'd like to second this request. Similarly, we have new developers who are just starting to learn Git, and we would prefer to remove any potential sources of confusion on workflow.

  4. Ricardo Machado

    I also would like to see this implemented. We have pre-push git hooks that, obviously, are not executed if the code is edited online. Some developers do that as a 'quick fix' and the best way to prevent it is to disable this functionality at all (on demand of course)

  5. Wesley Vestjens

    I'd like to second (third, fourth?) this. Especially annoying for me: README's are often created and editted only in master branch, causing them to be unavaible, or worse, unavailable in develop and other branches. That aside, code reviews and all of those kind of features, are unavailable when editting online, so I would like to be able to disable this as well.

  6. Alastair Wilkes staff

    Hi @Wesley Vestjens

    That aside, code reviews and all of those kind of features, are unavailable when editting online, so I would like to be able to disable this as well.

    Can you elaborate on this? When editing online, the user should have the option (or can be mandated, using branch restrictions) to open a pull request for his or her change, which reveals code review features. Do you refer to something different, perhaps outside Bitbucket itself?

    As a broader request to other commenters: I'm interested to know if using branch restrictions can help alleviate this concern; we use them internally and have found them to be quite effective in combination with the online editor. Feedback welcome!


  7. Wesley Vestjens

    @Alastair Wilkes is a file that is usually only edited online, so it'll only exist in the main branch. If pulled to any other branch, this creates problems, because there will now be multiple versions of the same file, while only the one in master is probably still updated.

    That aside, we currently define a format in PhpStorm regarding code style, which we expect developers to follow. Changes done through the online editor do not reflect these code styles we wish to adapt.

    Generally, we wish to discourage use of an online editor over PhpStorm (or any other IDE).

  8. Rheza Satria Ta

    @Alastair Wilkes yes, we could use branch restriction. Should put it clearly on Bitbucket docs how to disable online editing. or maybe having good UI (simple and intuitive) to settings it, would be good, cz it's difficult to find for current implementation, unless I google it first. that's my experience working with bitbucket.

  9. Alastair Wilkes staff

    Quick clarification: my recommendation to use a branch restriction was only related to ensuring all edits (including online edits) are merged via pull request (and thus via code review). Admittedly, that doesn't do much for code style enforcement. I did not mean to imply that we would create a branch restriction to allow/disallow the online editor. At present we don't have plans to make the online editor configurable, but we'll keep it in mind.

  10. Joerg Malter

    We have strictly regulation configurations in our IDEs for code-style and so on. We expect that our developers use this code-stype configurations. But the Online Editor, breaks all this regulations. What we need is a switch, to deactivate the Online Editor

  11. Log in to comment