Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

In Build Setup happens git merge with destination branch head - How I disable it?

Rodolfo dos Santos January 23, 2023

Bitbucket Pipelines

When a Pipeline was trigger, the Build Setup merges with destination branch head. PyLint broke in this case, as it checks something out of what has been modified, so how do I disable it?

Screenshot(2).png

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 25, 2023

Hello @Rodolfo dos Santos ,

Welcome to Atlassian Community!

The merge is happening because you are most likely using a Pull request triggered pipeline.

Pull request triggered pipelines behave a little differently than other types of pipelines, as it merges the destination branch into your working branch during the Build Setup. This is the intended behavior, as when you run a pull request pipeline you are usually interested to know if merging the content from the source and destination branches will break your build.

In case you do not want the merge to happen, you will need to use a different type of pipelines, such as branch pipelines. Branch pipelines will be triggered every time a new commit is pushed to a given branch or branch pattern you have configured, as in the below example : 

image: node:lts
pipelines:
  default:
    - step:
        script:
          - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
  branches:
    main:
      - step:
          script:
            - echo "This script runs only on commit to the main branch."
    feature/*:
      - step:
          image: openjdk:8 # This step uses its own image
          script:
            - echo "This script runs only on commit to branches with names that match the feature/* pattern."

Branches pipelines will run for a specific commit, and will not be merged to any other commit.

For more details on what types of pipeline triggers can be configured, you can refer to Pipelines start conditions.

Hope that helps!  Let me know in case you have any questions.

Thank you, @Rodolfo dos Santos .

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events