notifycat-relocate

command
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Command notifycat-relocate moves the Slack messages of open PRs from one channel to another after an operator repoints a repository in config.yaml.

Changing a repo's `channel:` only redirects *new* PRs: the messages of PRs that were already open keep living in the old channel, because the database records where each message was posted. This tool carries them over — it reposts each message in the new channel as a mention-free "moved" notice, retargets the stored row, carries the repo's own reactions across, and edits the original into a one-line pointer at the new channel. Nothing is deleted, so a thread hanging off the original stays readable where it is.

Usage:

notifycat-relocate -audit                        — list messages sitting in channels config no longer mentions
notifycat-relocate -from C_OLD -to C_NEW          — move every open PR's message
notifycat-relocate -from C_OLD -to C_NEW -repo org/repo
notifycat-relocate -from C_OLD                    — stop tracking the messages, leaving them in place
notifycat-relocate -from C_OLD -to C_NEW -dry-run — report what would change, write nothing

A PR that already has a message in the destination keeps that one and only loses the original, so a re-run never duplicates a message. The run is idempotent: the stored row is retargeted immediately after the repost, so anything already moved is skipped next time.

SLACK_BOT_TOKEN needs chat:write, reactions:write, reactions:read and the history scopes (channels:history, groups:history) — reading a message to repost it is the one thing the server itself never does. DATABASE_URL must point at the same database the server uses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL