Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tags and commits

Joao Pedro Correia October 27, 2023

Good afternoon!
Can I use a pipeline to prevent a commit from being made or something specific, for example in bitbucket cloud there is no validation for tags, so for example I want to prevent commits on a tag, to leave it immutable or even prevent its deletion, we know that git has a feature called git hook, can I implement this within the pipeline so that it blocks any commit before interacting with the repository?

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2023

Hey @Joao Pedro Correia 

I'm not getting your goals here, so I would appreciate it if you could give more context.

That said, in Bitbucket cloud, you can't directly use a pipeline to prevent a commit from being made or enforce Git hooks to block commits at the server level. Bitbucket cloud doesn't provide server-level Git hook capabilities like some other Git hosting services do.

You can take some alternative approaches to achieve similar outcomes using the following features:

I hope this helps.

Regards,
Syahrul

Joao Pedro Correia October 30, 2023

https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html#Usingrepositoryhooks-Defaultpre-receivehooks


I would like something like a pre-recive that analyzes before entering the cloud, similar to the link above, but I haven't found this functionality.

Joao Pedro Correia October 30, 2023

Is it possible to use branch restrictions on TAGs, such as stopping the name, being immutable, not allowing deletion?

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2023

Hi @Joao Pedro Correia 

It's not possible to use git hook in Bitbucket cloud or tags restriction. We do have an existing feature request on this at:

Regards,
Syahrul

Suggest an answer

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

Atlassian Community Events