Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10819

Propagate a custom error message from the hook

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • 9
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem Definition

      Upon using PreRepositoryHook veto message from this hook is not propagate a custom error message from the hook when committing file via the UI(online editor), the JS does not permit to pass any message from the hook. This is due to the code for commit-dialog.js has hardcoded only one message:

      webapp/default/src/main/frontend/static/bitbucket/internal/feature/file-content/edit/commit-dialog/commit-dialog.js
      

      This somehow rather falls back to printing the default errors:

      AJS.I18n.getText('bitbucket.web.sourceview.edit.error.forcePR.message'),
      AJS.I18n.getText('bitbucket.web.sourceview.edit.error.branchPermission.title')
      

      Suggested Solution

      Propagated the custom error message from the hook when committing files via the online editor in Bitbucket Server UI.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bannamalai Baskar Annamalai (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: