Inspiration

Every developer has written // TODO: Fix this later and then completely forgotten about it. Technical debt piles up silently in the codebase, invisible to Product Managers and hidden from the backlog. I built DebtCollector to ensure that every promise made in the comments becomes a tracked task in Jira—automatically.

What it does

DebtCollector is an Atlassian Forge app that lives in your Bitbucket workspace. It listens for Pull Request events, scans the code diff for patterns like // TODO: or # FIXME:, and instantly generates a linked Jira Task. The ticket includes the PR title and a direct, clickable link to the code, ensuring that "later" actually happens.

How we built it

This project is built using the Atlassian Forge platform and Node.js. It leverages the Bitbucket API to fetch PR metadata and raw diffs. Because of security scope boundaries between products, I implemented a custom bridge using Forge's external.fetch to communicate securely with the Jira REST API via API tokens.

Challenges we ran into

The biggest hurdle was the "Scope Wall"—the strict security boundary between Bitbucket and Jira permissions within the Forge ecosystem. I had to architect a solution that safely managed environment variables and security headers to allow data to flow between platforms without permission conflicts. Handling the Atlassian Document Format (ADF) for rich-text Jira descriptions also required deep diving into the JSON structures to ensure links were clickable.

Accomplishments that we're proud of

I am particularly proud of the flexible Regex engine that handles various comment styles across multiple languages and is smart enough to only flag new debt introduced in a PR. This prevents the app from spamming the team with tickets for old, existing debt. Successfully creating a seamless bridge between Bitbucket and Jira using Forge's external fetch was also a major technical win.

What we learned

I gained a deep understanding of the Atlassian Forge manifest system and the nuances of cloud app permissions. I also learned about the structure of Bitbucket event payloads—specifically that some events are "lightweight" and require additional API calls to fetch the full metadata needed to make a high-quality Jira ticket.

What's next for DebtCollector

  • Aggregation: Grouping multiple TODOs from a single PR into one "Cleanup" ticket to reduce backlog noise.
  • Auto-Assign: Using git blame or PR metadata to automatically assign the Jira ticket to the developer who wrote the comment.
  • Debt Dashboard: A Jira gadget that visualizes "Debt Created vs. Debt Resolved" to help teams track their health over time.

Built With

Share this project:

Updates