-
Suggestion
-
Resolution: Fixed
-
None
The 'File Edit' feature was introduced in 4.13.0 and allows plugins to prevent a file edit from being committed by raising the cancelable FileEditRequestedEvent.
The event in it's current form provides the repository, branch and the affected path, which is fine for permission-based checks. It does not however include the commit message or the new file content, which makes the event insufficient for plugin-proved checks that enforce commit message standards, or do content checks.
Adding the following fields to the event would make the event more useful:
- commit message
- updated file content
Workaround
The File Edit feature can be globally disabled by adding the following setting to BITBUCKET_HOME/shared/bitbucket.properties and restarting:
feature.in.browser.editing=false feature.file.editor=false
- is related to
-
BSERV-9551 Commits made via an infile edit do not notify HipChat
-
- Closed
-
- relates to
-
BSERV-3032 In-line File Editing
- Closed
YACC receives the event, but only applies its checks when the "request.getTrigger()" equals StandardRepositoryHookTrigger.REPO_PUSH or StandardRepositoryHookTrigger.BRANCH_CREATE.
This means YACC ignores events (even though it receives them) where the trigger equals StandardRepositoryHookTrigger.FILE_EDIT.
Consider opening a bug in the YACC bug tracker.
(p.s. I'm with Bit-Booster, and our competing free commit checker, Control Freak, properly checks file edits. But we're not DC certified yet - hopefully soon.)