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

Code suggestion apply rejected by plugin: error message is unhelpful and cannot retry

      Issue Summary

      Applying the code suggestion can fail with a generic error when the FILE_EDIT hook rejects the commit. This can be caused by a custom hook or a Yet Another Commit Checker Plugin (YACC).

      Steps to Reproduce

      Check the community ticket for more details: https://community.atlassian.com/t5/Bitbucket-questions/Are-code-suggestions-broken-in-Bitbucket-7-4/qaq-p/1453200

      Expected Results

      • The displayed error message should show detailed information about the reason of rejecting commit.
      • It should be possible to apply the suggestion with a second try.

      Actual Results

      • The displayed error message doesn't give the user any clue what's the reason of the failure.
      • After the failure, the apply button is disabled and the user can't re-apply the suggestion.

      Workaround

      Disable the custom FILE_EDIT hook or disable the Yet Another Commit Checker Plugin.

            [BSERV-12528] Code suggestion apply rejected by plugin: error message is unhelpful and cannot retry

            Carla Baba added a comment -

            Can reproduce on 7.7 with the following steps:

            • create apull request
            • add a branch permission hook to prevent "All changes" in the branch you have the PR open
            • add a suggestion 
            • try to commit the suggestion

            The generic error is displayed:

            Carla Baba added a comment - Can reproduce on 7.7 with the following steps: create apull request add a branch permission hook to prevent "All changes" in the branch you have the PR open add a suggestion  try to commit the suggestion The generic error is displayed:

              khughes@atlassian.com Kristy
              madamczak Maciej Adamczak (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: