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

Is it possible to push out a change to all the repos within a project?

msameer
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!
February 26, 2024

Is it possible to push out a change to all the repos within a project? And can we enforce branch protection as well?? 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2024

Hi @msameer,

You could use the following API endpoint:

This creates a new commit by uploading a file to a repo. You would need a separate API call per repo, but you could write a script that does that. If the file already exists in the repo, its content will be replaced with the content of the file you are uploading.

If you don't specify a branch, the file will be uploaded to the repo's main branch. You can also specify a branch:

curl -X POST https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/src \
--header 'Authorization: Bearer <token>' \
-F File1.json=@File1.json -F branch=feature-branch -F message="some commit message"


You can use branch permissions to restrict who can push or merge PRs to certain branches:


Please feel free to reach out if you have any questions!

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events