- Add a new dependency for godump in go.mod
- Import godump in main.go
- Introduce a debug flag in the CLI options
- Update the run function to include the debug flag
- Add logic to dump the plugin configuration if debug mode is enabled
- Extend the plugin struct to include a debug field
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Update usage descriptions for various webhook parameters to provide clearer context.
- Improve clarity in usage statements for Discord webhook configurations.
- Enhance descriptions for build-related parameters to better explain their purpose.
- Revise usage text for GitHub Actions parameters to ensure consistency and clarity.
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Add a new command-line flag for the Discord webhook URL
- Update the configuration structure to include the webhook URL
- Implement validation for the webhook URL format
- Introduce a method to retrieve the webhook URL from the configuration
- Refactor the code to use the new method for generating the webhook URL in multiple places
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- 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>
- Remove the `exportloopref` linter from the golangci configuration
- Add the `strconv` package import in `main.go`
- Replace the `fmt.Sprintf` for the year with `strconv.Itoa` to convert the year to a string
- Update the HTTP request method to use `http.MethodPost` instead of a string literal in `plugin.go`
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Update `github.com/stretchr/testify` from version `1.9.0` to `1.10.0`
- Update `github.com/urfave/cli` to version `v2.27.6` and change import path to include `/v2`
- Update `github.com/cpuguy83/go-md2man/v2` from version `2.0.4` to `2.0.5`
- Add `github.com/xrash/smetrics` as a new indirect dependency
- Change `cli.Author` to use a pointer type
- Update environment variable fields in multiple `cli.StringFlag` definitions to use `EnvVars` instead of `EnvVar`
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- 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>