Allow to customize what to build in terms of branches and PRs:

      • Only branches
      • Branches and PRs
      • Only PRs

      And for PRs builds:

      • Merge status (PR head merged with destination branch)
      • Head status (PR head)
      • Allow (or not) PRs from origin repository

      It would be something similar to what github-branch-source is offering (included in this PR)

          [JENKINS-36283] PR builds customization

          All cleared up now.

          Antonio Muñiz added a comment - All cleared up now.

          Armin C added a comment -

          Not sure if this is the right place....

          This issue seems to assume that you don't want to see the 'branch/pr' that you don't want to build automatically. I also have a case where I want to show all the branches and the PR's but I only want to build the PR's automatically and the branches can if needed be triggered manually to build.
          I was looking at the code but I can't find a way to do this 'correctly', it seems like you can only show or not show a branch but you can't show it and the skip the build on an event? If somebody has a tip what to look for in the code, that would be great.

          Armin C added a comment - Not sure if this is the right place.... This issue seems to assume that you don't want to see the 'branch/pr' that you don't want to build automatically. I also have a case where I want to show all the branches and the PR's but I only want to build the PR's automatically and the branches can if needed be triggered manually to build. I was looking at the code but I can't find a way to do this 'correctly', it seems like you can only show or not show a branch but you can't show it and the skip the build on an event? If somebody has a tip what to look for in the code, that would be great.

          jake bishop added a comment -

          arminc Did you find a solution in the end? I would like to do the same thing...

          jake bishop added a comment - arminc Did you find a solution in the end? I would like to do the same thing...

          Armin C added a comment -

          yakobe No and Yes.

          No because this plugin only scans and shows the branches but it does not decide if they are actually going to be build (automatically) or not, I haven't figured out exactly were it happens but I assume it's the GIT plugin that makes the decision based on if there are changes or not. I am stuck on how to proceed, maybe we can team up somehow to find a solution.

          Yes we created a workaround where it is possible to specify a regular expression that decides which branches you want to show, all pull requests are automatically showen. You can see the code changes here

          Armin C added a comment - yakobe No and Yes. No because this plugin only scans and shows the branches but it does not decide if they are actually going to be build (automatically) or not, I haven't figured out exactly were it happens but I assume it's the GIT plugin that makes the decision based on if there are changes or not. I am stuck on how to proceed, maybe we can team up somehow to find a solution. Yes we created a workaround where it is possible to specify a regular expression that decides which branches you want to show, all pull requests are automatically showen. You can see the code changes here

          jake bishop added a comment -

          arminc

          Thanks for your reply. Shame that there is no easy way to accomplish this at the moment. It would be great if the options suggested in this ticket were implemented as we cannot use the plugin without it (our build take a long time, so running the twice for each commit is not an option).

          I take it the suggested workaround is not something that we can use unless we fork the code and install our own version of the plugin? We would be very willing to help out in any way we can to accomplish the functionality we need, although our knowledge of programming jenkins plugins is limited at the moment.

          jake bishop added a comment - arminc Thanks for your reply. Shame that there is no easy way to accomplish this at the moment. It would be great if the options suggested in this ticket were implemented as we cannot use the plugin without it (our build take a long time, so running the twice for each commit is not an option). I take it the suggested workaround is not something that we can use unless we fork the code and install our own version of the plugin? We would be very willing to help out in any way we can to accomplish the functionality we need, although our knowledge of programming jenkins plugins is limited at the moment.

          Armin C added a comment -

          yakobe If you don't want to build the plugin your self you can use our build see here and to be specific this release contains fixes for the connections and possibility to select the branches you want to show.

          Armin C added a comment - yakobe If you don't want to build the plugin your self you can use our build see here and to be specific this release contains fixes for the connections and possibility to select the branches you want to show.

          Cosima Laube added a comment -

          Are there any plans when the Bitbucket branch source plugin catches up with the GitHub plugin's features?
          We would especially be interested in the possibility to build a PR merged with current master.

          Cosima Laube added a comment - Are there any plans when the Bitbucket branch source plugin catches up with the GitHub plugin's features? We would especially be interested in the possibility to build a PR merged with current master.

          James Dumay added a comment -

          cosima_laube we at CloudBees need parity with Github for Blue Ocean so we are considering picking this up. Unfortunately I can't share an ETA with you but it is on our radar.

          James Dumay added a comment - cosima_laube we at CloudBees need parity with Github for Blue Ocean so we are considering picking this up. Unfortunately I can't share an ETA with you but it is on our radar.

          Torben Knerr added a comment -

          Is PR 25 going in a good direction for this?
          https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/25

          Torben Knerr added a comment - Is PR 25 going in a good direction for this? https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/25

          James Dumay added a comment -

          I believe JENKINS-43507 contains this functionality and is due to be released in a few weeks.

          James Dumay added a comment - I believe JENKINS-43507 contains this functionality and is due to be released in a few weeks.

            amuniz Antonio Muñiz
            amuniz Antonio Muñiz
            Votes:
            26 Vote for this issue
            Watchers:
            33 Start watching this issue

              Created:
              Updated:
              Resolved: