while merging a pull request "close source branch" option is not greyed out when source is the main branch

XMLWordPrintable

      Issue Summary

      While creating a pull request, the option to "Delete Branch (source)" is greyed out for the main branch. but while merging a pull request "close source branch" option is not greyed out for the main branch.

      Steps to Reproduce

      1. Create a pull request with the source branch as the main branch
      2. Click on "merge", it should allow you to select "close source branch" for the main branch.

      eg: master is the main branch, it still allows you to select the option "close source branch"


       


      But even if the option "close source branch" is selected in the case of the main branch, pull request merge will fail with an error "Merge failed: Cannot close the source branch because it is the main branch of the repository."

      It would be better to grey out the option "close source branch" for the main branch and display the message "close the source branch option is not available because it is the main branch of the repository", rather than allowing users to select the option and then failing the pull request merge.

      Expected Results

      The option "close source branch" should be greyed out for the main branch.

      Actual Results

      It still allows users to select the option "close source branch" for the main branch.

      Workaround

      Currently, there is no known workaround for this behavior. But even if the option "close source branch" is selected in the case of the main branch, pull request merge will fail with an error "Merge failed: Cannot close the source branch because it is the main branch of the repository."

              Assignee:
              Unassigned
              Reporter:
              Suhas Sundararaju
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: