Skip to content

[luv-71] fix: Stop hook should skip when branch has no changes vs base #70

Closed

Description

@NiveditJain

Problem

The Stop hook currently requires a pushed branch and an open PR even when the branch has zero commits ahead of main. This forces unnecessary empty commits and dummy PRs just to satisfy the hook.

Reproduction

  1. Create a branch from main with no code changes (e.g. a release-only task)
  2. Try to stop the session
  3. Hook fails with:
    • fatal: Needed a single revision (branch not pushed)
    • No pull request found for branch (no PR exists)

Expected behavior

The Stop hook should detect that the branch has no diff vs the base branch and skip the push/PR requirement — similar to how require-pr-before-stop already handles the no-changes case in #67.

Current workaround

Create an empty commit and a dummy PR to satisfy the hook.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions