To make the usage of options more uniform across all foundry bots,
bots must read the name of the topic for outgoing messages from the
"publish-to" option.
This commit renames the "topic" option of watchbot to "publish-to".
main() {
local watchlist
local interval
- local topic
+ local publish_to
opt_add_arg "r" "repository" "rv" "" \
"Repository to watch for updates" \
"" _add_to_watchlist
- opt_add_arg "t" "topic" "v" "commits" \
+ opt_add_arg "p" "publish-to" "v" "commits" \
"Topic to publish notifications"
opt_add_arg "i" "interval" "v" 30 \
"Update check interval" "^[0-9]+$"
return 1
fi
- topic=$(opt_get "topic")
+ publish_to=$(opt_get "publish-to")
interval=$(opt_get "interval")
- inst_start _watch "$topic" "$interval" "${watchlist[@]}"
+ inst_start _watch "$publish_to" "$interval" "${watchlist[@]}"
return 0
}