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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


trigger an action when repo is forked?

I would like to trigger an action when a repo is forked, e.g. when I fork Repo A, I would like to trigger a change to the repository settings on the fork, Repo B.

For example, Bitbucket currently (and very wrongly) assumes that PRs in repos that were forked from an upstream, should target the upstream by default. There is currently no way to change this.

Since there is no way to change this and no merge check available based on the target repo, my workaround is to create a default pull request task on PRs that basically says "CHECK THE TARGET REPO" and then have a merge check for unresolved PR tasks.

What I'd like to do is to have this default pull request task created (and the corresponding merge check enabled) every time the upstream repo is forked.

Better yet, is there a way to create a set of repository settings that is automatically applied to each repo that is forked from the upstream?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 12, 2022

Hi Max,

You could use a webhook with trigger Repository : Fork for this purpose. With such a webhook, Bitbucket will send a request to a server of yours every time the repo is forked, and you can then run an API call on your server in order to update certain settings of the fork repo.

This is possible for settings that can be updated via our API. E.g. it is possible to create branch permissions via API:

However, I'm afraid that it is not possible to create default tasks via API. We have a feature request for providing an API for PR tasks: Until this is implemented, default tasks need to be created manually from the Repository settings.

We also have a feature request for allowing users to set the default target repository for forks I would encourage you to add your vote and feedback to that feature request if that's something you'd be interested in, as this helps our product managers better understand the demand for features.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events