19 Commits

Author SHA1 Message Date
appleboy 2cbd8efffa test: update color conversion tests for new calculation logic
- Update expected output values in color conversion tests to reflect new color calculation logic

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-07-05 22:46:25 +08:00
Bo-Yi Wu f2b9ede051 refactor: refactor messaging and file upload with improved error handling (#66)
- Refactor message and file sending logic into separate handleMessages and handleFiles methods
- Stream file uploads via io.Copy rather than loading the entire content into memory
- Add centralized http.Client with timeout for all requests
- Enhance error handling throughout by returning more descriptive and wrapped errors
- Improve response validation for file and message uploads, checking HTTP status and parsing error details
- Update tests to cover plain text messages, embed messages, file uploads, color conversion, and combined features
- Add tests using assert.Error/assert.NoError and checking specific error messages
- Simplify and clarify configuration validation logic

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-07-05 21:02:30 +08:00
appleboy 6c782afaae feat: add context support to Exec and SendMessage functions
- Update the `Exec` function to accept a context parameter.
- Modify the `SendMessage` function to also accept a context parameter.
- Add context import to the necessary files.
- Update test cases to pass a context when calling `Exec`.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-03-08 16:43:06 +08:00
appleboy 692f7ff6dd feat: add support for specifying source branch in build configuration
- Add a new flag `source.branch` with default value `develop` and usage description "git source branch"
- Add a new struct `Source` with a `Branch` field
- Add a new field `Source` to the existing struct `Build`
- Add a new test case with `Source.Branch` set to "feature/awesome-feature"

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-12-24 19:09:34 +08:00
Bo-Yi Wu e1e8532e04 chore: update
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-04 15:05:47 +08:00
Bo-Yi Wu 9fce8c8c6b fix: testing 2019-10-12 23:36:16 +08:00
Bo-Yi Wu f7ade7c458 feat(api): support upload file (#18)
fix #17
2019-02-25 17:18:39 +08:00
Bo-Yi Wu 28fc4d6511 feat: support default message for GitHub Action 2019-02-24 13:07:12 +08:00
Bo-Yi Wu 8fbae76b71 feat: support arm platform 2019-02-24 10:32:07 +08:00
Bo-Yi Wu a1ccf186fd refactor plugin
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 14:20:00 +08:00
Bo-Yi Wu 59a4e31bde add drone default template.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 11:31:23 +08:00
Bo-Yi Wu 1a5b8eaa1f update discord default template.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 00:37:22 +08:00
Bo-Yi Wu 2ee04c1fb0 Add color
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-14 14:51:15 +08:00
Bo-Yi Wu 13351b0dc6 add default template
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-14 12:24:45 +08:00
Bo-Yi Wu e4a13b26fb add Embed payload
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-14 11:03:44 +08:00
Bo-Yi Wu 100ff18145 update struct.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-10 17:42:11 +08:00
Bo-Yi Wu 3b65f97d8f rename content to message
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-10 17:28:05 +08:00
Bo-Yi Wu 84ee42a6e4 udpate testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-10 13:01:10 +08:00
Bo-Yi Wu 24befab16f initial project
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-10 11:14:12 +08:00