core
core copied to clipboard
The great configuration overhaul of 2020
Todo
- [ ] Config defaults https://github.com/yetibot/yetibot/issues/1017
- [ ] Support overriding any config using channel settings or user-specific settings
- [ ] Write the corresponding "Channel as context" guide
- [ ] Generate config from specs (instead of maintaining the 3 formats of sample configs at https://github.com/yetibot/yetibot.core/tree/master/config). Maybe a ClojureScript project that creates a React config component and publishes it to bit.dev
- [ ] Add config getter to
cmd-hook. This couples together a schema, a command and its namespace, and a subset of configuration. If the config is not present/valid, when a user tries to execute the command, the command would then report an error that it is not configured and a link to the exact subset of configuration it requires. This also allows yetibot core to pass the requested config submap to command handler functions, which means core can optionally override it based on channel settings ( - [ ] Audit all the specs and try to narrow them down, e.g.
yetibot.urlshould be a url that does not end with a/(alternatively, parse it with theurilib and get the part we want).
Issues
- Fixes https://github.com/yetibot/yetibot/issues/982
- Fixes https://github.com/yetibot/yetibot/issues/870
- Maybe fixes https://github.com/yetibot/yetibot/issues/965 (verify)
- Related: https://github.com/yetibot/yetibot/issues/1005
- Related: https://github.com/yetibot/yetibot/issues/1007
Tools
Codecov Report
Merging #130 into master will decrease coverage by
0.19%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 42.45% 42.26% -0.20%
==========================================
Files 94 91 -3
Lines 4070 3890 -180
Branches 184 171 -13
==========================================
- Hits 1728 1644 -84
+ Misses 2158 2075 -83
+ Partials 184 171 -13
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/yetibot/core/config.clj | 84.61% <ø> (ø) |
|
| src/yetibot/core/commands/decode.clj | 40.00% <0.00%> (-50.00%) |
:arrow_down: |
| src/yetibot/core/commands/uptime.clj | 36.36% <0.00%> (-27.28%) |
:arrow_down: |
| src/yetibot/core/models/default_command.clj | 45.45% <0.00%> (-4.55%) |
:arrow_down: |
| src/yetibot/core/adapters/adapter.clj | 62.50% <0.00%> (-4.17%) |
:arrow_down: |
| src/yetibot/core/util/format.clj | 76.05% <0.00%> (-3.68%) |
:arrow_down: |
| src/yetibot/core/webapp/resolvers.clj | 26.58% <0.00%> (-3.66%) |
:arrow_down: |
| src/yetibot/core/adapters.clj | 32.50% <0.00%> (-3.06%) |
:arrow_down: |
| src/yetibot/core/commands/category.clj | 27.27% <0.00%> (-1.62%) |
:arrow_down: |
| src/yetibot/core/repl.clj | 53.06% <0.00%> (-1.29%) |
:arrow_down: |
| ... and 14 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 99daeae...a11ed69. Read the comment docs.