import { archiveIfSafe } from "./archive-if-safe.js";
export function setupAutoArchiveOnMerge(options) {
    const log = options.logger.child({ module: "auto-archive-on-merge" });
    const inFlight = new Set();
    return options.workspaceGitService.onSnapshotUpdated((snapshot) => {
        void archiveIfSafe({
            cwd: snapshot.cwd,
            pullRequest: snapshot.github.pullRequest,
            inFlight,
            options,
            log,
        });
    });
}
//# sourceMappingURL=index.js.map