See Configuration samples for more info on how to configure these.
Provide default log location if not provided. Related to the changes in:
yetibot/core "20200403.184508.cab0823"
.
Upgrade to [lambdaisland/uri "1.2.1"]
Make yetibot log file path configurable (#129)
Check db connection in healthz endpoint in addition to adapter connections (#128)
Allow env var prefix overrides (#126)
Disable karma obs by default and allow it to be enabled on a per-channel basis #125
Ensure chat-source is propagated in emoji based karma obs (#124)
Fix Slack websocket dependency by using latest at stylefruits/gniazdo "1.1.3"
.
This broke Slack adapter in the previous version.
Add chat adapter for Mattermost #117
Check out the config sample to get started!
Prevent potential NPE by ensuring connection-last-active-timestamp
is not nil
in Slack's connected?
function.
This upgrade gets us ready for moving to Java 11 as the minimum version for Yetibot.
Use cp/system-classpath for java > 8 since we are switching to 11+ #118
Allow sub expressions in xargs - #114
Handle "Nick in use" notice in IRC adapter - #113 by @sarg
- Fix data propagation for collections in xargs #112
-
Reply in-thread for observers and in-thread message edits #109
-
Remove
lein-npm
and vendoryetibot-dashboard
resources instead #110
- Fix missing literal transformer and busted cmd command - #108
-
Support data propagation into sub expressions from a previous command in a pipeline #104.
This PR significantly increases the expressiveness of command pipelines in Yetibot two ways:
-
Allow sub expressions to access data propagated by the previous command in a pipeline, e.g.:
category names | echo async: `render {{async}}` ci: `render {{ci}}`
Previously, the sub expressions on the right side would not be able to access the data from
category names
. This is because the AST interpreter we were using (provided by Instaparse) would evaluate ASTs depth first, which meansrender {{async}}
andrender {{ci}}
would be evaluated beforecategory names
.The new interpreter evaluates commands left to right, and resulting data is bound to a dynamic var, letting sub expresesions access that data.
-
Add the ability to execute Yetibot commands from Selmer expressions in
render
. This allos you to render custom data as normal, but now you can pipe those into a Yetibot command from Selmer. As an example, consider a commandscores
that outputs data in the shape:[{:score 123 :zip 90001} {:score 198 :zip 95125}]
What if we wanted to render the score next to the current weather description for the zip code?
Now we can, like:
scores | render Score {{score}} - {{zip|yetibot-data:weather|get:weather|get:description}}
And with data propagation to sub expressions, the same could be expressed as:
scores | echo Score `render {{score}` - `render {{zip}} | weather | render {{weather.description}}
This PR also enabled Code Coverage reporting via codecov.io. As an example, check out this codecov report.
-
- Switch from schema to clojure.spec - #106 by anthonygalea
- Restrict access to private chat in history command
- Enable continuous delivery for all commits on master. A blog post with more details about this and other changes is forthcoming.
-
Overhaul the
history
command, adding a bunch of options to specify which history to fetch:[["-h" "--include-history-commands"] ["-y" "--exclude-yetibot"] ["-e" "--exclude-commands"] ["-n" "--exclude-non-commands"] ["-a" "--include-all-channels"] ["-c" "--channels CHANNEL1,CHANNEL2"] ["-u" "--user USER1,USER2"] ["-s" "--since DATE"] ["-v" "--until DATE"]]
See
help history
for the full docs! -
Add ability to merge query maps in
yetibot.core.db.util/merge-queries
-
Ensure piped values are always converted to strings via `(pseudo-format cmd-with-args (str previous-value))
-
Add
date
andduckling
commands.date
is essentially a specialization ofduckling
- it errors if it can't parse a date out of the expression you give it. Both of the commands use Duckling to parse a natural language expression. Some things to try:date 2 hours ago date next thanksgiving date saturday date summer solstice date first day of fall date july
- Propagate data in collection commands
- Remove aliases from help docs - #95
- Fix karma regression where user could increment their own karma #92 by @jcorrado.
- Cleanup karma formatting #94 by @jcorrado.
- Karma improvements:
- Increase command timeout to 5 seconds (previously 1 second)
- Make admin config optional
- Ensure previous value in args is a string to prevent errors in piped expressions if a command returns a non-string
- Hardcode a chat source and user for the eval GraphQL resource
- Promote the concept of admin from eval-specific to a general concept and allow any command to be configured as admin-only - #87
-
Allow globally disabling embedded expressions like
`echo foo`
via configuration:
:yetibot-command-embedded-enabled "false"
or equivalent EDN:
:command {;; Whether or not embedded commands should be globally available ;; (enabled by default) :embedded {:enabled "false"}}
-
Allow globally disabling fallback commands via configuration:
;; Whether to enable having a fallback command. Default is true. :yetibot-command-fallback-enabled "false"
:command {;; Whether to enable having a fallback command. Default is true. :fallback {:enabled "false"}}
- Fixup help doc on
channel unset
command - Add
yetibot.core.test
with Midje checkers to help unwrap return maps from commands #81
-
Allow non-map results in xargs #79
-
Added karma high-score and high-giver reports in GraphQL #77 by @jcorrado.
Now accepting limits on count of returned karma records for aggregate reports, in stead of hard coding to 10. Our model defends the DB, forcing a range of 1
-
- Upgrade Selmer to 1.12.11
- Re-release without REBL under resources
- Fix
%s
expansion in alias - this was being overriden by alias' special$s
expansion since we moved to the standardpseudo-format
function #76 - Surface
karma
via GraphQL API #69
- Fix posting collections in Slack Threads - #868
- Preserve data in data - #72
- Allow commands to specify multiple regex / topic pairs #73
- Add string command, stop unfurling, and upgrade a bunch of deps - #74
- Fixup history commands being formatted incorrectly
- Detect URLs that have &t=.jpg as images too
- Output images as Slack Blocks
- Fix bug in
emoji
where a space on the end would cause an NPE and add better error reporting if the user doesn't provide a valid emoji - Fix broken
repeat
and add test coverage
- Fix bug that could cause
users
to blow up
- Botched release
- Mutable config is fully deprecated and removed! See the blog post for details on reasoning and how to migrate old configuration if necessary. #61
- Remove
room
method fromAdapter
- Ensure
head
andtail
always return a string for individual values. Related to #829. - Upgrade to
yetibot-dashboard 0.7.2
- Fix setting Yetibot graphql endpoint in dashboard before the JS that uses it loads
- Fixup
yetibot-dashboard
to serve new assets by parsing theindex.html
output byyetibot-dashboard
'screate-react-app
scripts. - Upgrade to yetibot-dashboard 0.7.1
- Improve Slack connection logic: when ping timeout is surpassed the Slack
adapter will now report
false
forconnected?
- Upgrade to yetibot-dashboard 0.7.0
- Fix
!!
-
Fix bug in
render
when collections were passed across a pipe, e.g.:list 1 2 3 | render foo
- Replace
"_"
with" "
on reactions from react observers, e.g.thinking_face
becomesthinking face
- Re-hookup the
flatten
command (it was removed at some point)
- Remove duplicates in
category list <category>
command - Add
:collection
metadata to all the collection commands so they properly show up in the!category list collection
command
- Fixup bug in xargs where raw
:result/data
/:result/value
data structures were returned instead of being extracted - Post react observer reactions on the thread of the message reacted to
-
React event support for observers! #756
This enables fun Slack-specific behavior where a reaction can trigger a Yetibot command.
For example, to generate a rage meme whenever someone reacts with 😡 on a message:
!obs -e react rage = meme rage: {{body}}
See the docs on
!help observe
for more info!
- Ignore
on-message-changed
events in Slack if user is Yetibot to avoid double recording history. When Slack unfurls things it fires a message changed event.
- Fix
!that
command
- Fix evaluation of subexpressions - #55
- Upgrade to
org.clojure/java.classpath "0.3.0"
- Throw an error if db namespaces to load are empty
- Add new
record-and-run-raw
function to handle recording history and evaluating expressions via the main pipeline (viahandle-raw
) and also for alias, observers, and cron. This fixes a major bug in aliases that was introduced in 0.4.47.
- Remove fenced code block formatting on multiline Slack messages since it breaks Emoji and other Slack formatting niceties.
- Fix buggy empty collection checking in xargs
- Allow suppression meta to work on collections of suppressed items
- Allow xargs to intelligently use
pmap
ormap
depending on whether the command it's executing has:async
in its:yb/cat
set. #49 by @jcorrado - Encode explicit errors - #48
- Prevent embedded commands from producing errors - #767
- Add
raw all
command to show all command args - Render multi line messages in Slack as code
- Add
command-execution-info
function to help testing command parsing and regex matching - #43 - Fix
users
in Slack - #555
- Use ping/pong events in Slack to monitor the connection
- Expose connection latency metrics on GraphQL
:adapters
resolver - Upgrade to
yetibot-dashboard 0.6.6
- Improve logging in interpreter
- GraphQL updates
- Added
user
resolver and addeduser
field onhistory
type - Added
channels
resolver to list all channels for all adapters - Added history_item` resolver to get a single history item by ID
- Added
- Upgrade Slack libraries #42 by @cvic
- Switch to
irresponsible/tentacles
#41 by @cvic - Enable remote nREPL on port
65432
#44 - Upgrade to
yetibot-dashboard 0.6.5
- Upgrade to
yetibot-dashboard 0.6.0
- Add support for
yetibot_only
in GraphQL History resolver - Fix airity bug when trying to reconnect to Slack
- Use
to_tsquery
instead ofto_tsquery
in history resolver search to support queries with spaces
- Add
/healthz
endpoint #691
- Upgrade to
yetibot-dashboard 0.5.4
- Add cache-busting query param with the hash of vendor.js and main.js
- Support new
search_query
param on history resolver - Add support for
commands_only
in history resolver
- Upgrade to yetibot-dashboard 0.5.0
- Add new
is_private
column to history table and consider a message in Slack adapter private if it's either a direct message or from within a group. - Elide
is_private
entities from history in GraphQL API
- Add ability to obtain GraphQL endpoint from env
- Massively increase GraphQL coverage to support yetibot-dashboard
- Consume npm dep
yetibot-dashbaord
and use its JavaScript output to render the dashboard and sub-routes
- Prevent Yetibot from triggering itself - #40
- Fix
config-prefix
requires now that it moved toyetibot.core.util.command
- Add
yetibot.core.test.loader
to load all observers and commands at test time to find bad requires earlier on
-
Add
yetibot.core.parser/unparse
to take an expression tree and unparse it back to the original string that produced it when parsed. -
Record Yetibot's output in the history table for all adapters (Slack, IRC). History is now recorded directly in the
yetibot.core/handler/handle-raw
function instead of the oldhistory-observer
, which was removed. This is becausehandle-raw
has all the context to create history for both users and Yetibot, including the Yetibot user and a new computedcorrelation-id
, computed as:(let [timestamp (System/currentTimeMillis) correlation-id (str timestamp "-" (hash [chat-source user event-type body]))] ;; ... )
The
correlation-id
is stored in both the user's command (request) history entry and Yetibot's evaluation (response) history entry so the two can be easily correlated.This supports History of Yetibot output for a given command #728.
-
Added new
command
text column to the history table to be used to record the request command that correlates with Yetibot's response. As such, this column is only set on:is-yetibot true
columns
- Fix
bot_mesage
->bot_message
typo that was preventing bot messages from being observed in Slack
- Record all Yetibot history in the database
- Add subcommands on history to show all Yetibot history or all non-Yetibot history
- Support listening to Slack attachment style messages
- Attempt to idempotently add columns to db tables on startup if the table already exists. This allows adding columns to tables over time (but never changing or deleting columns).
- Switch eval type on GraphQL endpoint to
(list String)
to support expressions that return lists
-
Add initial GraphQL with
eval
query support. Example:{eval(expr: "echo foo | echo bar")}
-
Enable
Access-Control-Allow-Origin *
header so we can hit GraphQL endpoint from the docs to support interactive docs
- Accurately record history using adapter UUID instead of type
- Add
cron
command! - yetibot/yetibot#150
- Reply to threads in Slack
users
now lists all users in a room, regardless of whether they are active or not. This is due to Slack's Changes to presence that makes it much harder to listen forpresence_change
events.
- Change
YETIBOT_CONFIG_DISABLED
toYETIBOT_ENV_CONFIG_DISABLED
and log when it's disabled
- Add support to ignore all env-based config if
YETIBOT_CONFIG_DISABLED
is set to a value
- Listen to
bot_message
event subtypes in Slack
- Upgrade to Clojure 1.9
- Allow env-based config to override individual values of edn-based config - #690
- Run custom observer handlers in a separate thread and never spew an exception
- Allow
nil
to suppress output - #618 - Detect nil user ID when a user tries to create an alias - #667
- Migrate from Datomic to Postgres
- Move
!
andthat
into yetibot.core
This release focuses on observer power ups 💪
- Room specific observers - #29
- Enable enter and leave observers
- Enable template access to channel name and username in observers #694
Examples:
-
Welcome users to the
#general
channel when they join:!obs -eenter -cgeneral = echo welcome to #general, {{username}}!
-
Send a user a private message when they join the
#dev
channel:!obs -eenter -cdev = "echo hi {{username}} welcome to #dev! | replyto {{username}}"
It also works for leave
events:
!obs -eleave -cdev = "echo hi {{username}} welcome to #dev! | replyto {{username}}"
- Prevent IPV6 issues with nrepl start-server
- Use default port of 3003
- Fix encoding of @here and @channel in Slack
- Fix reading string port from the environment as an integer
- Run the web server on port specified by environment variable
PORT
defaulting to 3000 if not specified
- Upgrade all the outdated deps
- Add support for a configurable default command and remove broken Bing and Google Image Search commands
- Bind adapter inside each IRC event handler. This was preventing the IRC adapter from functioning.
- Allow custom prefix. (#23, @dawsonfi)
- Fix error when attempting to create mutable config on startup but the
config
dir doesn't exist by usingmake-parents
to ensure the dir exists.
- Add
nil
command (moved from Yetibot) - Add
react
command for Slack reactions
- Allow creating observers for specific user patterns - #605
- Update images to new Yetibot design
- Decode slack url encodings when there are multiple urls in a message - #603
- Improve Slack url unencoding and add tests. Before it only properly unencoded
urls like
<Google|http://google.com>
. Now it also unencodes<https://www.google.com/>
.
- Fix fn airity bug in IRC where multi-line messages would error
0.4.0 decomplects mutable and immutable configuration in a non-backward-compatible way. Please see config docs docs and port your existing config to the new structure.
- Refactor configuration:
It was getting quite unweidly and inconsistent with somewhat arbitrary
hierarchies.
- Separate out the mutable parts (e.g. IRC room config) from actual immutable configuration.
- Use Environ for immutable config and dec to explode flat config into nested maps
- Use
yetibot.core.config-mutable
for mutable parts - Use schema to validate the expected
shape of config when obtaining via
get-config
- Moved the ssh command out of yetibot and into yetibot.core
- Upgraded to Clojure 1.8.0
- Upgraded many dependencies
- Listen to Slack edit events and re-execute command devth/yetibot.core#483 by @LeonmanRolls
- add logging to web requests
- add tentacles dependency
- fix global anchor styles
- configure CodeClimate
- upgrade minor versions of some of the outdated deps to latest:
- [cheshire "5.5.0"]
- [environ "1.0.2"]
- [http-kit "2.1.19"]
- [org.clojure/core.cache "0.6.4"]
- [org.clojure/core.memoize "0.5.8"]
- [org.clojure/java.classpath "0.2.3"]
- [org.clojure/tools.namespace "0.2.11"]
- [org.clojure/tools.nrepl "0.2.12"]
- [org.clojure/tools.trace "0.7.9"]
- add
url
command to post Yetibot's configured web address - load routes from plugins for matching namespaces
- simplify web view and style
- ensure discovered db schemas are unique
- reduce Slack logging
- fix botched 0.3.10 release due to compiler error
-
support serving web routes in plugins. Namespaces should match:
#"^.*plugins\.routes.*"
And each namespace must have a symbol
routes
that contains the routes.
- reduce logging
- upgrade data.xml to 0.0.8
- error and exit if config is missing; #532
- stop loading config on namespace load; load it explicitly
- fix chat-sources in Slack to use channel names instead of IDs
- fix airity bug in update-settings that prevented being able to set a room setting
- fix datomic warnings
- upgrade Clojure from 1.6 1.7
- upgrade Instaparse from 1.2.2 to 1.4.1
- further improve disabled category messaging
- improve disabled category messaging
- remove
fun
from default room settings since it's now controlled bycategory
- Support categories for commands and enabling/disabling them for specific
rooms. All categories are enabled by default. Categories docs are at
CATEGORIES. See command usage with
help category
.
- Re-release due to Clojars downtime
- Fix unwords when a non-collection is passed to it
- Pass room settings as
:settings
key to all command handlers - Fix bug where yetibot was observing itself, causing potential infinite loops
-
Deprecated Campfire adapter but left code in place in case anyone wants to port it to the new protocol-based adapter system. If you use Campfire and want it to be supported but don't want to PR let me know and I'll re-add it. It was removed because I wasn't sure anyone uses Campfire.
-
Huge refactoring of adapters. Each adapter is now an instance of an Adapter protocol, and there can be any number of the various types of adapters (currently Slack & IRC).
Rooms are now configured independent of adapter configuration. Configuration is non-backward compatible. See config-sample.edn for details.
-
Refactored room settings. Arbitrary config can now be set on a room, e.g.
!room set jira-project YETI
Defaults for known settings are:
Name Default broadcast false jira-project "" jenkins-default "" But you can also set any key/val you like.
To view settings use
!room settings
.Full
room
docs:room settings <key> # show the value for a single setting room join <room> # join <room> room leave <room> # leave <room> room list # list rooms that yetibot is in room settings # show all chat settings forall rooms room set <key> <value> # configure a setting for the current room
-
Disalbed AOT
- Add support for per-room settings (new data structure in config). Format:
:irc {:rooms {"#yetibot" {:broadcast? true}
"#workstuff" {:broadcast? false}
The above :irc
settings would allow yetibot to post Tweets in the #yetibot
channel, but not in the #workstuff channel. Not backwards compatible with old
config