Skip to content

ajxv/debt-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DebtCollector

Turn code comments into actionable Jira tickets automatically. Built for Atlassian Codegeist 2025


The Problem

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.

This is fine

The Solution

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.

Magic Automation

How it Works

  1. Trigger: The app wakes up on avi:bitbucket:created:pullrequest.
  2. Scan: It fetches the raw code diff and uses a Regex pattern to find added lines starting with + that contain comment markers.
  3. Action: It hits the Jira REST API to create a Task linked back to the specific PR.

Tech Stack

  • Atlassian Forge (Node.js)
  • Bitbucket API (v2.0)
  • Jira REST API (v3)
  • Regex (The real hero here)

Installation

Prerequisites

  • Atlassian Forge CLI
  • A Bitbucket Workspace
  • A Jira Cloud Project

Setup Guide

  1. Clone the repo

    git clone [https://github.com/your-username/debt-collector.git](https://github.com/your-username/debt-collector.git)
    cd debt-collector
  2. Install dependencies

    npm install
  3. 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>
  4. Deploy

    forge deploy
    forge install

Workflow Demo

  1. Open a PR with // TODO: Fix the login bug.
  2. DebtCollector scans it.
  3. Refresh Jira... and it's there.

It works

Future Improvements

  • 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.

About

Automatically transform Bitbucket code comments into Jira tickets. A lightweight Forge app built to track technical debt directly from your Pull Request workflow.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors