Bamboo Deployment Plugin - Jira Issues and Commits

I’m creating a custom deployment task and for part of it I’m trying to get the Jira issues linked to it as well as the commits, however, I cannot seem to find a way to access them from the DeploymentVersion nor the DeploymentContext. Any advice on how to access the issues/commits would be helpful.