Atlassian Codegeist Unleashed Hackathon 2023 — Voice It Up- Sandy Inspires
Resurrect dark data to life with AI- building the future of workspace AI with Forge App
$ whoami
I’m Santhosh Kumar aka Sandy (Sandy Inspires), I work as a Data Engineer II at Rakuten, Bangalore, India. I’m from Salem, Tamil Nadu, India and I like hacking for fun.
What is the inspiration to participate in this hackathon?
Every time I attend a scrum call, it’s taking away my productive time, it might not be the case for all, but when you work on a critical deliverable, distractions like these can easily be boring for a developer. This is just me but when I write code, I just need to eat something at my desk, visit the restroom, and sleep and repeat the same thing over again. Most or all of the hackathons I’ve participated in are of that sort, I just want to write code all day and complete it as soon as possible. Even when I work at my office, I prefer to have as less distractions as possible. This way you’ll save developers time and thereby save 10 to 25% of developer’s time every week.
Why as an Atlassian Forge application?
Jira, BitBucket, and Confluence have become an integral part of our day-to-day activity. Any call or any issue you face you’ve to use one of these platforms to resolve things. Interestingly there are ways to modify or add a new feature to the existing application with something called a Forge App.
I got started as the below diagram suggested, a simple way to start off the development setup on your local machine.
Create or use an existing Atlassian API token to log in to the CLI. The CLI uses your token when running commands.
- Go to https://id.atlassian.com/manage/api-tokens.
- Click Create API token.
- Enter a label to describe your API token. For example, my-first-forge-api-token.
- Click Create.
- Click Copy to clipboard and close the dialog.
Log in to the Forge CLI to start using Forge commands as shown above.
- Azure OpenAI Service — Make Chat Completion API calls
- Jira Rest API — Access Jira ticket descriptions and assignee
- BitBucket Rest API — Access repo commit messages
- Confluence Rest API — Access page details (team details and logging pages)
- Forge App Storage — Store the usage logs of each user
- node.js — Building the code for Forge backend
What it does?
It can help in two different scenarios — The following are the features you can use,
Daily Scrum Call update
- What’s the update? 🗣️ — You’re on a scrum call with your team and the AI can give you the ticket update instead of the developer
- Can it be reassigned? 🤔 — You can use this to see if there is anyone else who can take up this ticket except the current assignee
- Assess commits quality? 🧪 — Score the commit messages of the developer in the range of 1 to 5
- Assess code quality? 👾 — Analyze the BitBucket repo and provide a rating in the range of 1 to 5
Backlog Grooming
- Whom to assign? 💬 — This can give you a fair suggestion on whom to pick for the ticket
- Get story points? ✏️ — This can help in proving story points based on the Jira ticket description
- Get ticket labels? 🏷️ — This can assign labels to the current Jira ticket
Sharing some outputs
- Output of Assess commits quality?
2. Output of Get story points?
Where to store the data?
This was interesting to solve for, I initially wanted to store the data in Postgres outside of the Atlassian cloud but there are a lot of issues with privacy and data governance.
Then I thought why can’t we use confluence to do so, but it can’t scale, you can’t update the confluence page everytime why someone performs an action. What’s the solution?
Then I found there is a key-value storage service offered by Atlassian — Forge Storage API.
mainfest.yml describes your Forge app in detail and any change to this, you need to execute forge deploy
modules:
jira:issuePanel:
- key: voice-it-up
function: main
title: Voice-It-Up
icon: https://developer.atlassian.com/platform/forge/images/icons/issue-panel-icon.svg
function:
- key: main
handler: index.run
app:
id:
permissions:
scopes:
- "read:jira-work"
- "read:page:confluence"
- storage:app
external:
fetch:
backend:
- "https://sandy-openai-playground-4.openai.azure.com"
- "https://api.bitbucket.org"
- "https://sandyinspires.atlassian.net"
- "https://eastus.api.cognitive.microsoft.com"
- "*.microsoft.com"
- "*.azure.com"
How you structure your app is really important if you want to push it to marketplace and have multiple people contributing to the app.
It costed me around $2 to test this entire application making around 122 API calls.
Did I struggle, yes!!!
- Getting the confluence page details and formatting has become a bottleneck during the final phase of the development
- I was not able to use BitBucket context and Confluence context in the Jira instance so I’ve to use the Rest APIs to get things done
- A lot of node and React stuffs are not available in Forge (window.speechSynthesis) — was struggling to make it work
- We’ve to use Form if I’ve to use toggle button with @forge/ui node package- can’t find a workaround for it
- Was not able to access confluence page data with the older access token, I’ve to create a new token after the confluence page was created to access the data
Responsible AI principle
Why this is important, as the industry starts adopting this new change of AI in everything and everywhere. You need some checks in place to make sure we don’t over do things and compromise on things that we shouldn’t.
Privacy — We don’t store any data that is sent into our Forge application, everything inside is stateless and we only log the number of times any given action is performed
Fairness and inclusiveness — We don’t share any personal information with the LLMs service providers so it is not biased in any way when it generates the output
Transparency — We’ve asked the LLM to justify each metric it produces, for example, why this ticket get a story point of 8 and not 5
What’s next?
- Let it out on Atlassian Marketplace to get more feedback
- Definitely integrating the Jira sprint management and how and when to start a sprint
- Adding a feature to assess the priority of each ticket based on the project goals and other parameters
- Add temp storage for previous results to show up, this might come in handy when you want to see how the ticket summary has evolved along the sprint
Conclusion
It’s been an amazing experience building this Forge app and deploying it in development and seeing it in a live Jira instance. Can’t emphasis more on why reading documentation is important, every detail in the documentation is important, Atlassian documentation was the key to complete this prototype at a rapid phase. I’m new to React too.
Hope you found this useful! Thanks for reading this till the end. Cheers! Have a good one!
References: