Overview
It’s possible to connect to a Jira instance using Python, and it’s possible to connect to AWS Comprehend using Python. Therefor, it is possible to marry the two, and use Python to assess the sentiment of Jira issues. There are two caveats when it comes to using this script:
- The script assumes you can authenticate against Jira with Basic Web Authentication. If your organization uses Single Sign On, this script would need to be amended.
- The script assumes you’re working with Jira Server or Datacenter. If you’re using Jira Cloud the approach would be different, but I’m planning to do a post about that in the near future.
The authentication method below is not mine. I have linked to the Stack Overflow page where I found it, in the script comments.
The Script
The script starts with three imports. We need the Jira library, logging, and the AWS library (boto3). You’ll likely need to a PIP install of Jira and boto3, if you’ve not used them before.
After the imports we’re defining client, which we use to interact with the AWS API. Remember to change your region to whichever region is appropriate for you, in addition