Turn code comments into actionable Jira tickets automatically. Built for Atlassian Codegeist 2025
We have all been there. You are rushing to meet a deadline, the code is messy, so you leave a comment: // TODO: Refactor this later.
But "later" never comes. The comments pile up, the tech debt grows, and your backlog has no record of it.
DebtCollector bridges the gap between your code and your project management. It lives in your Bitbucket repository and watches for new Pull Requests.
The moment you commit a TODO, FIXME, or HACK, DebtCollector parses the diff and instantly creates a Jira ticket for it.
- Trigger: The app wakes up on
avi:bitbucket:created:pullrequest. - Scan: It fetches the raw code diff and uses a Regex pattern to find added lines starting with
+that contain comment markers. - Action: It hits the Jira REST API to create a Task linked back to the specific PR.
- Atlassian Forge (Node.js)
- Bitbucket API (v2.0)
- Jira REST API (v3)
- Regex (The real hero here)
- Atlassian Forge CLI
- A Bitbucket Workspace
- A Jira Cloud Project
-
Clone the repo
git clone [https://github.com/your-username/debt-collector.git](https://github.com/your-username/debt-collector.git) cd debt-collector -
Install dependencies
npm install
-
Configure Secrets Because we bridge two different products, we need an API token to handle the permissions securely.
forge variables set JIRA_EMAIL <your-email> forge variables set JIRA_TOKEN <your-api-token> forge variables set JIRA_DOMAIN <your-site.atlassian.net>
-
Deploy
forge deploy forge install
- Open a PR with
// TODO: Fix the login bug. - DebtCollector scans it.
- Refresh Jira... and it's there.
- Grouping multiple TODOs from one PR into a single "Cleanup" ticket.
- Assigning the ticket to the developer who wrote the comment.
- Adding a "Debt Scoreboard" to the Jira dashboard.


