For an university project, my group and I are trying to identify the most problematic XWiki components. For that, we tried to link issues with code. However, if we are not wrong, you use Github to commit and Jira for issues.
The only way we found to relate both is Jenkins. However, we can access to only 20 last builds, which makes the data collect quite biased.
So, when we commit, the commits message include the JIRA issue number. That’s how you relate them. Jenkins doesn’t come into the picture. You just need to look at the git commit messages to find the related JIRAs. You can also look at the JIRA issues and if you’re logged in on JIRA you can see the commit issues. I guess that’s also queryable using the JIRA REST API.