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

Is there a way to get all JIRA projects linked to a repository from the fisheye connection config via REST?

Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2011

I want to limit commit access to a repository based on the JIRA issue in the commit message. I thought driving it from that config screen would be a good idea. The idea is I link foo-repo to the foo project on the fisheye config screen, then if a user trys to commit to the foo-repo using a JIRA, BAR-101, I would do a query, see BAR is not linked to foo-repo and reject the commit.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
jhinch (Atlassian)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2011

You should be able to use this REST resource on your FishEye instance in order to get a list of projects associated with a particular repository

<FISHEYE_BASE_URL>/rest/applinks/1.0/entitylink/list/com.atlassian.applinks.api.application.fecru.FishEyeRepositoryEntityType/<REPO_NAME>?typeId=com.atlassian.applinks.api.application.jira.JiraProjectEntityType

For the reverse lookup (list of repositories linked to a project) on your JIRA server use this REST resource

<JIRA_BASE_URL>/rest/applinks/1.0/entitylink/list/com.atlassian.applinks.api.application.jira.JiraProjectEntityType/<PROJECT_KEY>?typeId=com.atlassian.applinks.api.application.fecru.FishEyeRepositoryEntityType
Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2011
didn't work in 4.3.3. Entity type is not supported: class com.atlassian.applinks.application.fecru.FishEyeRepositoryEntityTypeImpl
jhinch (Atlassian)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2011
Updated answer. The REST call needs to be made to the FishEye server.
Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2011
Sweet! The JIRA call gave me the mappings and since I will have both the Jira project and the repository, (oh, but not the key. I'll have to work on that.), this should work. The fisheye call gave an empty set so I must have something wrong with my applink configuration.
TAGS
AUG Leaders

Atlassian Community Events