Skip to content

feat: improve PM notifier run-local script#4933

Merged
mrice32 merged 5 commits intomasterfrom
mrice32/pm-notifier-script
Feb 26, 2026
Merged

feat: improve PM notifier run-local script#4933
mrice32 merged 5 commits intomasterfrom
mrice32/pm-notifier-script

Conversation

@mrice32
Copy link
Member

@mrice32 mrice32 commented Feb 24, 2026

  • Fix macOS sed -i compatibility: added empty string argument (sed -i ''). Without this, it was failing on my system.
  • Ensure repos are on latest master: added an ensure_repo_up_to_date helper that checks each repo's branch and remote status, prompting the user to switch to master and/or pull if needed (both are skippable). I ran into this issue because my bot-configs was out of date, causing an env to be missing.
  • Auto-clone bot-configs to temp dir: to make this fast, there's no reason not to just clone bot-configs to a temp dir rather than having the user paste.

This should all make the script faster to use in a pinch.

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
error "bot-configs path is required"
exit 1
fi
UMA_BOT_CONFIGS="$(mktemp -d)/bot-configs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that comfortable having sensitive env values in the /tmp, better to delete it immediately upon creating .env.local and/or exit trap

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, that's fair. I think mktemp is generally fairly safe since it sets the permissions restrictively, but we can delete it after so we avoid it sticking around. That's a fair compromise I think.

Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

md0x
md0x previously approved these changes Feb 24, 2026
Copy link
Contributor

@md0x md0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, including @Reinis-FRP suggestions.

Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com>
mrice32 and others added 2 commits February 24, 2026 10:45
Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com>
The bot-configs repo contains sensitive data, so delete the temporary
clone once it's no longer needed for .env generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrice32 mrice32 requested review from Reinis-FRP and md0x February 24, 2026 18:00
@mrice32 mrice32 merged commit 26345f7 into master Feb 26, 2026
7 checks passed
@mrice32 mrice32 deleted the mrice32/pm-notifier-script branch February 26, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants