Can we add a custom check on repository before merge of pull request in bitbucket ?

Sai Krishna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2024

when ever a new table is created, we wanted to make sure that table is added to tblOrgTablesList

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 7, 2024

Hello @Sai Krishna ,

thank you for reaching out to the Community!

Since the validation you are looking to implement is very custom, I would suggest two possible approaches that could help :

  • Using Forge to create a custom merge check:

    Forge is an Atlassian extensibility framework that can be used in Bitbucket Cloud to create apps for custom merge checks in your pull requests. You can learn more about Forge and some example apps to use as reference in the following articles: 
  • Using Bitbucket Pipelines to run a script that validates the code: 

    Bitbucket Pipelines is a CI/CD service built into Bitbucket. It allows you to automatically build, test, and deploy code based on a configuration file in your repository. You can use Pipelines to run a script that checks for your specific conditions before merging : 
    pipelines:
    pull-requests:
    '**': # This means this will run for all branches
    - step:
    name: "Check New Table"
    script:
    - bash check_new_table.sh
    Where the check_new_table.sh script would need to be coded according to the repository's structure and requirements of the validation you are looking for.

Both methods would require the creation of custom scripts developed specially for your project's specific needs and structure.

Hope that helps! Should you have any questions, feel free to ask.

Thank you, @Sai Krishna !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events