Docs / How “Needs run” works

How “Needs run” works

Each step watches some paths. After a merge, ReleaseKey lights up only the steps whose files changed since they last succeeded.

Knowing which button to press is the core of ReleaseKey. Here’s exactly how it decides.

Baselines

After a step succeeds, ReleaseKey records the commit that was checked out as the step’s baseline.

The check

On refresh, ReleaseKey fetches and runs, for each step:

git diff --name-only <baseline> origin/main -- <watch paths>
  • Any changed file means the step shows Needs run · N files. Click the pill to see the files.
  • No changed files means Up to date.
  • A step that has never succeeded here shows No baseline.

The comparison is against origin/main, so a step lights up as soon as a PR is merged on GitHub, even before you pull.

Watch paths

Watch paths are git pathspecs:

Step Good watch paths
Supabase migrations supabase/migrations
Edge functions supabase/functions
Trigger.dev deploy src/trigger, trigger.config.ts
git push heroku main . (anything changed)
A one-off or diagnostic step none (always manual)

A step with no watch paths is always manual and never shows Needs run.

Mark as deployed

Onboarding an app that’s already in sync? Use ⋯ → Mark as deployed. It sets the step’s baseline to the current origin/main without running anything.

Why not mise task sources?

mise has a sources option for tasks, but mise uses it to skip a task when its files haven’t changed (“sources up-to-date, skipping”). A deploy button that silently does nothing is worse than no button, so ReleaseKey keeps watch paths separately and always runs what you press.

Keeping it correct

“Needs run” detection is the heart of the app, and it’s covered by tests that build throwaway git repos (test/git.test.ts). If you contribute, keep them passing.

Something unclear or out of date? Email hello@releasekey.dev.