# Which Commit Broke It? Connecting Customer Tickets to Code Changes

> “Login stopped working this morning” always leads to the same question: what changed? TR-AI reads recent commits and pull requests from GitHub or GitLab, read-only, and lists the ones that may be related to an investigation as strong, moderate or weak leads, each with its reasons.

Source: https://www.ticketresolve.ai/blog/code-changes-behind-customer-tickets · Published 2026-11-14 · TicketResolve AI

**When a customer reports "login stopped working this morning", the first engineering question is always the same: *what changed?* Answering it means scrolling through yesterday's merges, guessing which pull request touched authentication, and asking around.**

Here's how that search usually goes, at a company that sells a patient-portal app to clinics. On Wednesday morning, tickets arrive: patients at several clinics can't sign in with their date of birth.

- **The on-call engineer, Dmitri,** opens the repository and scrolls through 40 merges from the last two days.
- **He finds** a pull request titled *"Upgrade auth library"* and suspects it. He spends an hour reading it. It's fine.
- **A colleague mentions** a change to date formatting in the patient profile service, merged by a different team. It wasn't tagged with anything about sign-in.
- **That's the one.** Dates of birth are now sent as `YYYY-MM-DD` instead of `DD/MM/YYYY`, and the sign-in check compares strings.

Every piece of information was there: the error mentioned `dob_mismatch`, the stack trace named `profile/format.ts`, and the change was merged the night before. Nobody had connected them.

## First, the basics

- **A commit** is one saved change to code. **A pull request** (GitHub) or **merge request** (GitLab) proposes changes for review.
- **A repository** holds a project's code.
- **An access token** lets TR-AI read your repositories without your password.
- **Read-only** means TR-AI can look but not change anything.
- **A stack trace** lists the files and functions where an error happened.
- **An issue key** like ENG-7 identifies an engineering ticket.
- **A lead** is a possible connection worth checking, rated **strong**, **moderate** or **weak**.
- **The unified timeline** shows an investigation's events in order, from the customer's report to the fix.

**Why does this matter?** Most production problems follow a change. Finding the right change quickly, from the evidence the investigation already has, saves the hour spent reading the wrong pull request, and rating timing-only matches as weak stops teams from blaming whatever shipped last.

## The problem, in plain terms

1. **"What changed?"** means scrolling through dozens of merges.
2. **The obvious suspect** (anything named "auth") gets checked first.
3. **The real change** is often made by another team, under another name.
4. **Timing alone** gets mistaken for cause.
5. **Code changes aren't connected** to the investigation's evidence.

## Connect, read-only

**TR-AI already gathers the evidence for an investigation: the errors, the stack trace, the deployments, the engineering issue. Now it can also look at the code changes.**

**An admin connects GitHub or GitLab (including self-hosted GitLab) with an access token and picks the repositories. TR-AI indexes the last 30 days of commits and pull or merge requests every 30 minutes: titles, authors, the paths of changed files and the issue keys they mention. It doesn't copy file contents, and read access is all it needs.**

## Related changes, with reasons

**Every investigation gets a Code tab listing the changes that may be related. Each one is a strong, moderate or weak lead, and shows why:**

- **it references the engineering issue for this case (ENG-7);**
- **it changed a file that appears in the stack trace;**
- **it mentions words from the error: a field name, a function;**
- **it touches the service that's failing;**
- **it shipped shortly before the problem was first seen.**

**That last reason is deliberately weak on its own. A deployment an hour before an outage is worth checking, not convicting, so a change matched on timing alone never shows as more than a weak lead.**

## On the timeline

**Commits and pull requests that reference the engineering issue also land on the investigation's unified timeline, under *Code changes and pull requests*, between the escalation and the deployment that shipped the fix.**

## A worked example, start to finish

Here's the patient-portal sign-in problem, with code changes on the investigation. The details are illustrative.

**Setup.** An admin connected GitHub with a read-only token and picked the three repositories the portal uses. TR-AI indexes them every 30 minutes.

**Wednesday 08:30, the investigation.** Support's TR Investigate investigation has the error `dob_mismatch`, a stack trace through `profile/format.ts` and `auth/verify.ts`, and the failing service: *patient-auth*.

**Wednesday 08:35, the Code tab.** Dmitri opens it. The related changes:

- **Strong:** *"Standardise date formats in patient profile"*, merged Tuesday 22:10 by the profile team. **Changed a file in the stack trace** (`profile/format.ts`); **mentions words from the error** (`dob`); **shipped shortly before** the problem.
- **Moderate:** *"Refactor auth/verify helpers"*, merged Monday. **Changed a file in the stack trace** (`auth/verify.ts`), but nothing else in common.
- **Weak:** *"Upgrade auth library"*, merged Tuesday 18:00. **Touches the service**, **shipped shortly before**. Nothing in the stack trace, no words from the error.
- **Weak:** *"Update billing e-mails"*, merged Tuesday 23:00. **Timing only.** Never more than weak.

**Wednesday 08:45.** Dmitri opens the strong lead first. In two minutes he sees the date format change and the string comparison in `auth/verify.ts`. He opens ENG-7 and references it in a fix: normalise both dates before comparing.

**Wednesday 09:30, the timeline.** The fix pull request references **ENG-7**, so it lands on the investigation's **unified timeline** under *Code changes and pull requests*, between the escalation and the deployment that shipped it.

**What didn't happen.** Nobody spent an hour on the auth library upgrade. Nobody rolled back the billing e-mails because they happened to ship last.

## Five more real-world scenarios

### 1. A change that references the issue

**Situation.** A pull request mentions ENG-7 in its title.

**How TR handles it.** Strong lead, with the reason "references the engineering issue".

### 2. Only timing

**Situation.** A change shipped an hour before, on an unrelated service.

**How TR handles it.** Weak lead. Timing alone never shows as more than weak.

### 3. Self-hosted GitLab

**Situation.** Your code lives on your own GitLab server.

**How TR handles it.** Self-hosted GitLab is supported.

### 4. Worried about code being copied

**Situation.** Security asks whether TR-AI stores source code.

**How TR handles it.** It indexes titles, authors, file paths and issue keys; it doesn't copy file contents.

### 5. An older change

**Situation.** The cause was a change from six weeks ago.

**How TR handles it.** TR-AI indexes the last 30 days; older changes won't appear, so the investigation's other evidence matters.

## Before and after

**Before.** An hour reading the wrong pull request, a colleague's memory saving the day, and a change from another team nobody connected to sign-in.

**After.** A strong lead at the top of the Code tab with three reasons, the cause found in two minutes, timing-only changes kept weak, and the fix on the investigation's timeline.

## How to tell it's working

- **Engineers open the strong lead first**, and it's usually right.
- **Fewer rollbacks** of changes that only shipped nearby.
- **Fixes appear** on investigation timelines.

## Who it's for

- **On-call engineers** asking "what changed?".
- **Support engineers** preparing escalations.
- **Engineering leads** who want cross-team changes visible.

## How it fits with the rest of TicketResolve

Code changes join the evidence **TR Investigate** already collects: errors, stack traces, **deployments** and **engineering issues**. They appear on the **unified timeline**, feed **release risk**'s bug history, and give the **fix assistant** the files to propose a change against.

## Why read-only, and why no file contents

Connecting code to a support tool raises fair questions. Read-only access means TR-AI can't change anything in your repositories through this connection. Indexing titles, authors, file paths and issue keys, without copying file contents, means your source code isn't stored in another system. That's enough to match changes to stack traces, errors and issues, which is what the Code tab needs. Writing code, if you ever want it, is a separate, opt-in step.

## Reading the reasons

The reasons tell you how much to trust a lead. **References the engineering issue** is a direct link. **Changed a file in the stack trace** means the error passed through code that changed. **Mentions words from the error** means the change is about the same thing. **Touches the service** means it's in the right area. **Shipped shortly before** is just timing. A lead with three reasons deserves your first look; a lead with one, especially timing, deserves a look only if nothing stronger explains the problem.

## Getting better leads

The Code tab can only match what your commits and pull requests say. A few team habits make the leads much sharper.

- **Mention issue keys** in pull request titles or commit messages. "ENG-7: normalise date of birth" turns a moderate lead into a strong one, and puts the fix on the investigation's timeline.
- **Write descriptive titles.** "Standardise date formats in patient profile" matches words from errors far better than "misc fixes".
- **Connect every repository** the product uses, including shared libraries. A change in a shared package often explains errors in several services.
- **Keep stack traces in tickets and errors.** The file paths are one of the strongest reasons a change shows up.

## Mistakes to avoid

- **Opening the most recent change first.** Open the strongest.
- **Treating a weak lead** as the cause.
- **Giving TR-AI a write token** when read access is all it needs.

## Do it in TicketResolve, step by step

**Where:** an investigation's **Code** tab (`/dashboard/investigate`); connection in Engineering intelligence → Code (`/dashboard/engineering-intelligence`). **You'll need:** an admin to connect GitHub or GitLab with a read-only token. **Full guides:** [TR Investigate: from a ticket to a verified fix](https://www.ticketresolve.ai/docs/guide/tr-investigate) and [Engineering intelligence and the unified timeline](https://www.ticketresolve.ai/docs/guide/engineering-intelligence).

1. **(Admin) Connect GitHub or GitLab** with an access token and pick repositories.
2. **Wait for indexing**: the last 30 days, refreshed every 30 minutes.
3. **Open an investigation** and go to the **Code** tab.
4. **Read the related changes**, strong first, and each one's reasons.
5. **Open the strongest lead** and check it against the error.
6. **Reference the engineering issue** in your fix.
7. **Check the unified timeline** for code changes and pull requests.

**How to check it worked:** the Code tab lists related changes with strength and reasons, and changes referencing the issue appear on the timeline.

## Frequently asked questions

**Which code hosts are supported?**
GitHub and GitLab, including self-hosted GitLab.

**What access does TR-AI need?**
Read access only.

**Does it copy our code?**
No. It indexes titles, authors, changed file paths and issue keys.

**How far back does it look?**
The last 30 days, refreshed every 30 minutes.

**How are leads rated?**
Strong, moderate or weak, from issue references, stack-trace files, error words, the service and timing.

**Can timing alone make a strong lead?**
No. A timing-only match never shows as more than weak.

**Where do code changes appear?**
On each investigation's Code tab, and on the unified timeline if they reference the engineering issue.

**Can TR-AI propose a fix?**
Yes, with the separate fix assistant, which engineers review.

**Do commit messages matter?**
Yes. Issue keys and descriptive words make leads stronger.
