51 Commits

Author SHA1 Message Date
Bo-Yi Wu cff7d4e183 fix: skip integration tests without telegram secrets; apply modernize fix 2026-04-16 22:39:48 +08:00
Bo-Yi Wu 0bc6220388 fix: resolve all golangci-lint issues
- Replace fmt.Printf with log.Printf to satisfy forbidigo
- Fix ineffectual assignment to err in proxy block by avoiding variable shadowing
- Format long lines with golines
- Use assert.Error/NoError instead of NotNil/Nil for error assertions
- Use assert.True/False instead of Equal for boolean assertions
- Use assert.Empty instead of Equal with len check
- Use require for mid-test error assertions that guard subsequent operations
- Add testify/require import
2026-04-08 22:47:32 +08:00
Bo-Yi Wu d0cc2a2774 refactor: refactor code and update linter config
- Add a new `.golangci.yml` configuration file with a list of enabled linters
- Exclude `lll` linter for lines starting with `//go:generate`
- Replace `strings.Replace` with `strings.ReplaceAll` in `plugin.go` for markdown escaping and error message sanitization
- Simplify time addition expressions in `plugin_test.go` by removing unnecessary `time.Duration` conversions

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-03-05 21:51:11 +08:00
Bo-Yi Wu ab44454733 chore: remove trim \n from message (#105) 2021-07-12 15:17:02 +08:00
Bo-Yi Wu ca270b33c8 Fix can't call duration helper func (#104)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-03 12:39:54 +08:00
Bo-Yi Wu 882afee629 chore: upgrade drone template (#103) 2021-07-03 11:56:16 +08:00
vaaski 6dbb4b1735 add disable_notification parameter (#99) 2021-04-03 06:38:16 +08:00
Bo-Yi Wu 792e5b5eab refactor: DisableWebPagePreview
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-03 09:36:32 +08:00
Bo-Yi Wu 392621b9a5 refactor: DisableWebPagePreview
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-03 09:22:38 +08:00
Bo-Yi Wu dc17cf7288 refactor: DisableWebPagePreview
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-03 09:20:17 +08:00
Dmitry Bolotin f021aab825 Option to load tempate variables from json file (#98) 2020-09-17 06:52:42 +08:00
Bo-Yi Wu ce15798a06 chore: update message format 2020-06-20 13:51:48 +08:00
Bo-Yi Wu 2c8ab1428b chore(drone): update default template.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-12-11 10:34:52 +08:00
Bo-Yi Wu 602b560c4d chore: update default template 2019-12-11 07:34:42 +08:00
Bo-Yi Wu ba1db08ad2 chore: update default message in Drone CI/CD. 2019-12-11 07:24:10 +08:00
Bo-Yi Wu 44ac6f43de fix: testing 2019-12-07 13:03:59 +08:00
Bo-Yi Wu 5ac85a3412 chore: update socks5 message 2019-12-07 13:00:35 +08:00
icecream78 abba2cb37d Add socks5 proxy to plugin (#87) 2019-12-07 11:29:47 +08:00
Daniel M. Lambea ace08f12b9 Unescape html entities (#85)
* Create a constant for 'markdown' formatting style, to reduce duplicated strings and make the code less error-prone

* Unescape HTML entities from text messages
2019-10-30 19:50:31 +08:00
Daniel M. Lambea b7f97df101 Add support for generic templates by using custom extra vars (#84)
* Fix DOCS.md example configuration with custom message from file

* Move .test.message to a better named file

* Add support for additional, custom extra vars to be used in the message template

* Add cmdline/envvars to support the extra vars

* Enhance DOCS.md with example configuration using generic template file with custom vars

* Add testcase for custom template vars
2019-10-29 10:57:00 +08:00
Daniel M. Lambea f8f311ba1f Add support for auxiliary message file (#81)
* Add support for external message loaded from the file specified in Config.MessageFile

* Enable the message file option in command line/env vars

* Update docs

* Add a testcase

* Fix YAML tag in DOCS.md from 'messageFile' to 'message_file', as is commonly used in Drone

* Remove unintended blank line

* Move .test.message file to tests/ folder
2019-10-22 23:44:50 +08:00
Bo-Yi Wu fe44d6f9a2 fix: testing 2019-09-25 21:59:11 +08:00
Bo-Yi Wu b6fad392f8 fix: testing 2019-09-25 21:40:51 +08:00
Bo-Yi Wu 71a0551697 feat(GitHub): support default message 2019-02-17 16:03:10 +08:00
Bo-Yi Wu 4d2a304048 refactor(message): update default message 2019-02-17 15:44:29 +08:00
Bo-Yi Wu 861d6e1adb feat: add some env from github action 2019-02-17 15:39:47 +08:00
Bo-Yi Wu a2a49f1249 feat: Support wildcard attachment list (#62) 2018-04-06 10:28:55 +08:00
Bo-Yi Wu f22326b26a feat(logs): show logs if send error. (#55)
* feat(logs): show logs if send error.
2017-12-18 15:16:10 +08:00
Bo-Yi Wu 0afb796085 add HTML Entities testing. #50
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-12-02 17:30:28 +08:00
Rafael Bodill 6f651a91d2 Decouple 'commit' object and add commit.link (#51)
* Decouple commit out from build and add commit.link

* Fix tests for Commit decouple

* Update documentation for Commit decouple
2017-09-11 12:34:47 +08:00
koluchiy 3a61750059 escape _ symbol for markdown format (#40)
* escape _ symbol for markdown format

* fmt

* tests

* tests

* tests
2017-07-04 06:03:14 -05:00
Bo-Yi Wu 8c74c44621 switch glide to govendor (#43)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-03 23:11:48 -05:00
Bo-Yi Wu 70655117a2 support tag string.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-24 09:37:19 +08:00
Bo-Yi Wu 42457f46db fix index out of range bug.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-17 13:13:43 +08:00
Bo-Yi Wu f3e25a0846 Support Match Email condition.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-09 12:00:36 +08:00
Bo-Yi Wu e0760eaf80 change , to :
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-04 11:39:30 +08:00
Bo-Yi Wu dbb5972732 update testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-04 09:43:21 +08:00
Bo-Yi Wu dc6dc4a444 Support send notification to commit author by check email.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-04 09:38:21 +08:00
Bo-Yi Wu e2fc930461 support handlebar template
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-31 09:57:34 +08:00
Bo-Yi Wu 693f15783c Support Venue Message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 03:33:44 -05:00
Bo-Yi Wu b52dcfe9c2 Support Video Message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 02:38:08 -05:00
Bo-Yi Wu 3f25341c8b Support Location Message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 02:21:12 -05:00
Bo-Yi Wu 1142360e53 Support Voice Message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 01:04:34 -05:00
Bo-Yi Wu 8c0a2a65dc Support Audio message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 01:04:34 -05:00
Bo-Yi Wu 57468ba50b Support Send with New Sticker.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-08 21:19:30 -05:00
Bo-Yi Wu dfd91c671b Support Send with New Document.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-07 09:09:37 -05:00
Bo-Yi Wu 8bd5e965e7 add tests image.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-07 03:02:29 -05:00
Bo-Yi Wu fd83eb04f4 support send photo message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-07 03:02:29 -05:00
Bo-Yi Wu f80e79f1c6 Support debug mode.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-04 22:23:13 +08:00
Bo-Yi Wu 541efa4e5b Test wrong bot token.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-04 22:09:10 +08:00