···55# New configuration for star counting window and threshold
66# Timeframe in hours to look back when counting recent stars
77TIMEFRAME=1
88-# Threshold for the number of stars within the timeframe to trigger a log message
88+# Threshold for the number of stars within the timeframe to trigger a post
99STAR_THRESHOLD=1
10101111# Timeframe in hours to gate posts after a threshold is met (default 24)
+8
Dockerfile
···11+FROM rust:1.89.0-bookworm AS builder
22+WORKDIR /app
33+COPY ../ /app
44+RUN cargo build --release
55+#
66+FROM rust:1.89-slim-bookworm AS api
77+COPY --from=builder /app/target/release/bot /usr/local/bin/bot
88+CMD ["bot"]
+4-3
README.md
···11-# Come back later
11+# Stitch Counter
2233-It ain't much, but it's bandiad engineering.
33+Listens for stared repos and post them to [@stitch.selfhosted.social](https://bsky.app/profile/stitch.selfhosted.social)
44+if they meet the threshold and are "trending".
4555-66+
+1-1
bot/src/main.rs
···105105 let bot_pds_url = std::env::var("BOT_PDS_URL").expect("BOT_PDS_URL must be set");
106106107107 log::info!(
108108- "Starting bot with username: {}\nTimeframe threshold: {}\nStar Threshold: {}\nPost Threshold: {}",
108108+ "Starting bot with username: {} Timeframe threshold: {} Star Threshold: {} Post Threshold: {}",
109109 bot_username,
110110 timeframe_hours,
111111 star_threshold,