Guides · Contents
Guides

How API changes affect GitHub repositories

A provider change becomes concrete only when you can name the repositories, files and call sites it touches. Here is how to build that map.

A changelog entry is not an incident. It becomes one only when it maps onto code you run. The repository is where that mapping happens, and the hard part is that API usage is rarely declared in one obvious place.

Where API usage actually hides

  • Environment variable names: STRIPE_SECRET_KEY, OPENAI_API_KEY, TWILIO_AUTH_TOKEN. The name identifies the provider even when no import mentions it.
  • SDK imports and constructors: import stripe, from openai import OpenAI, new Twilio(...). These survive refactors better than raw HTTP calls.
  • Package names in manifests: stripe, @slack/web-api, openai. Useful, but they only cover the client library, not the endpoint being called.
  • Raw endpoint strings: https://api.stripe.com/v1/charges, https://slack.com/api/chat.postMessage. These are the most precise signal and the easiest to miss, because they can live in config, tests and fixtures.
  • Webhook routes: hooks.stripe.com, /webhooks/github. A provider change to signature verification or payload shape breaks these without touching a client call.

A repository-wide scan that only reads dependency manifests will find the fourth of those and miss the rest. That is the usual reason a team believes it has an inventory when it has a list of packages.

Version pinning is where most surprises start

GitHub versions its REST API by date and asks clients to send that date explicitly: X-GitHub-Api-Version: 2022-11-28. A request without the header does not fail — it falls back to a default version, and that default can move. The same request can start returning a different response shape without a line of your code changing.

curl -H 'Accept: application/vnd.github+json' \
  -H 'X-GitHub-Api-Version: 2022-11-28' \
  https://api.github.com/repos/OWNER/REPO/issues

Stripe uses a related but different model: each account has a default API version, a request can override it with a version header, and the changelog describes what changes between dated versions. The practical consequence is the same — the version you are effectively using is a property of configuration and request code, not of the package version in your manifest.

From changelog entry to file list

A useful impact map answers four questions for a single entry, in this order:

  • Which surface does the entry change? An endpoint path, a response field, a header, an auth scheme, or an entire version.
  • Which repositories in the organisation reference that surface? Grep is the right first tool: endpoint hostnames and path prefixes are highly specific strings.
  • Which call sites inside those repositories depend on the specific behaviour that changed? A removed field only matters where that field is read.
  • Is the call on a critical path? Payment capture and a nightly analytics sync deserve different response times.

Skipping the third question is what turns a monitoring system into an alarm that everyone mutes. A repository that imports the Stripe SDK but never touches the changed endpoint is not affected, and saying so explicitly is more valuable than listing it as a risk.

Monorepos and multi-repo organisations

In a monorepo the scan is one pass but the ownership question is harder: a shared client package can be called by a dozen services, and the changelog impact lands on whichever squad owns the caller. In a multi-repo organisation the opposite is true — ownership is obvious per repository, but nothing guarantees that every repository is connected to the same view of provider changes.

Either way, the unit of decision is the call site, not the repository. Repository-level labels are only useful because they route the work to a team.

What to do with the map

  • Pin the API version explicitly in code and record the retirement date next to it.
  • Add a contract test that asserts the fields you read, so a removal fails a test rather than a customer request.
  • Keep the endpoint inventory current — regenerate it on every default-branch push rather than in a quarterly audit.
  • When a change is classified as additive, record it and move on. Not every entry deserves a ticket.
TipBreaklytix produces this map by scanning repository trees, then matching classified provider changes to detected usage. The output is a file and line reference, plus a confidence level — not a claim that every match will break.

Does a provider change always require a code change?

No. Many entries are additive — a new optional field, a new endpoint, a new webhook event. The useful question is whether the change touches a surface your code reads or writes. A change that adds a field your parser ignores is safe to record and close.

Why is the API version header more important than the SDK version?

The SDK version describes the client library you installed. The API version describes the server behaviour you are asking for. A new SDK talking to an old API version, or an old SDK talking to a new default version, are both possible. The server contract is what actually changes response shapes.

How often should repository usage be rescanned?

At least on every push to the default branch. API usage moves between releases, and an inventory that is a quarter old will miss new call sites — which are exactly the ones nobody has tested against a provider change yet.

Further reading
Related articles