Skip to content

Hooks: init.sh must create .pr-monitor-seen.json on first run #94

@Maleick

Description

@Maleick

Problem

monitor-prs.sh fails with exit 1 if .autoship/.pr-monitor-seen.json doesn't exist (line 39 redirect fails with set -euo pipefail).

The script has: [[ -f "$SEEN_FILE" ]] || echo '{}' > "$SEEN_FILE" but this fails if .autoship/ dir permissions are wrong OR if the test runs before mkdir creates it.

Fix

init.sh should create an empty .pr-monitor-seen.json: echo '{}' > .autoship/.pr-monitor-seen.json

Acceptance Criteria

  • init.sh creates .pr-monitor-seen.json (and any other state files monitors need) on first run
  • monitor-prs.sh does not fail on a fresh AutoShip workspace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions