Forums

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

REST API or process to find

DJM
Contributor
April 6, 2018

Hi,

would like to known is there any way or any REST API to find out which Jira project is associated with which repository for bitbucket.

 

Thanks

DJM

1 answer

0 votes
Prasanth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 10, 2018

If you are using the default Jira-Bitbucket server integration, it works based on the issue key provided in the commit message. It's not exactly a project in JIRA to Bitbucket Repository integration.  That being said you can use REST API in Bitbucket to get the changesets associated with a issue key and issue keys associated with commits in a specific pull request. So you can use this data and possibly generate the mapping between project in jira and repository relation.

Please see for retails on REST api available REST Resources Provided By: Bitbucket Server - JIRA Integration

You can find more details about jira integration in jira integration.

Regards

Prasanth - Atlassian

DJM
Contributor
April 10, 2018

Hi Prasanth,

so does that mean that Jira project and GIT repo are not tightly couple.

for example if i have project A in Jira and we have repository in Bitbucket like repo1,repo2,repo3 so any commit done on repo1 can link to any issuse in jira until that user is part of that project.we would like to know how can we force the user to use a particular repo with particular project in Jira.

currently i see only way is to do permission from project level in Jira which will allow user to access repo of that project only where it has access to Jira of that project.

 

Please let us know your view on this.

 

DJM

Aron Gombas _Midori_
Community Champion
April 10, 2018

You can implement this with Commit Policy Plugin for Jira plus its adapter for Bitbucket by setting up a custom commit policy for the Bitbucket repo.

The commit policy should contain a JQL condition with a query like this (not tested):

project in projectsWhereUserHasRole("Developers")

This requires the committer to mention issue key(s) from project(s) where he has the "Developer" role.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence administration, confluence admin training, confluence learning path, manage users and permissions, confluence certification, atlassian learning, cloud admin tools, streamline collaboration, confluence admin best practices

🚨New Confluence Admin Course Alert!

Manage Confluence like never before! This new learning path teaches you how to manage content, users, and permissions while optimizing user experience. Built for admins at all levels who want to confidently lead and unlock more innovative collaboration.

Learn more
AUG Leaders

Atlassian Community Events