Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add discourse service #217

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

feat: add discourse service #217

wants to merge 12 commits into from

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 27, 2021

Builds on WebClient from #185. Also needs tests etc.
Supports creating topics, banners, private messages and posts (replies to topics).
Returns errors from the API to the consumer app:

go run ./cli send discourse://discobot:****@disco.ketsueki.meta/banner -t 'Shoutrrr Test' -m 'Shoutrrr test message'
Error: discourse API: "Title has already been used"
exit status 69

Closes #216.

@codecov
Copy link

codecov bot commented Nov 27, 2021

Codecov Report

Merging #217 (d46f560) into main (e46ecc1) will decrease coverage by 0.21%.
The diff coverage is 71.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
- Coverage   76.95%   76.73%   -0.22%     
==========================================
  Files          85       93       +8     
  Lines        2703     2828     +125     
==========================================
+ Hits         2080     2170      +90     
- Misses        441      471      +30     
- Partials      182      187       +5     
Impacted Files Coverage Δ
pkg/services/gotify/gotify_json.go 0.00% <0.00%> (ø)
pkg/services/slack/slack_config.go 100.00% <ø> (ø)
pkg/services/telegram/telegram_json.go 94.44% <ø> (+5.55%) ⬆️
pkg/util/util.go 72.72% <ø> (ø)
pkg/util/util_tls.go 0.00% <0.00%> (ø)
pkg/services/smtp/smtp.go 79.05% <46.66%> (-2.97%) ⬇️
pkg/services/discourse/discourse_post_type.go 50.00% <50.00%> (ø)
pkg/services/gotify/gotify.go 72.34% <54.54%> (-4.59%) ⬇️
pkg/services/discourse/discourse.go 74.41% <74.41%> (ø)
pkg/services/telegram/telegram.go 71.42% <75.00%> (-1.30%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e46ecc1...d46f560. Read the comment docs.

@dorianim
Copy link

@piksel what is needed to get this merged?

@piksel
Copy link
Member Author

piksel commented Jan 24, 2022

It needs #185 to be merged and tests.

@simskij simskij marked this pull request as ready for review March 9, 2022 16:26
@simskij simskij marked this pull request as draft March 9, 2022 16:27
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.

Add support for Discourse
2 participants