From e1397811b0c1d1d6400ae9983d11e46931d5df3c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 29 May 2022 22:22:48 +0200 Subject: [PATCH] adjust wording of the help texts --- _docs/data/data.yaml | 12 ++++++------ cmd/drone-matrix/config.go | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_docs/data/data.yaml b/_docs/data/data.yaml index 12466de..bf61bc6 100644 --- a/_docs/data/data.yaml +++ b/_docs/data/data.yaml @@ -1,22 +1,22 @@ --- properties: username: - description: The authentication username. If set, password is required as well. + description: Authentication username. If set, the `password` parameter is required as well. type: string required: false password: - description: The authentication password. + description: Authentication password. type: string required: false user_id: - description: The authentication user uid. If set, access token is required as well. + description: Aauthentication User ID. If set, the `access_token` parameter is required as well. type: string required: false access_token: - description: The authentication access token. + description: Authentication access token. type: string required: false @@ -27,12 +27,12 @@ properties: required: false roomid: - description: The Room ID to send messages to. + description: Room ID to send messages to. type: string required: false template: - description: Golang Template for the messages. + description: Golang template for the messages. defaultValue: build {{ build.status }} [{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }} type: string required: false diff --git a/cmd/drone-matrix/config.go b/cmd/drone-matrix/config.go index 3f5664f..a9c0246 100644 --- a/cmd/drone-matrix/config.go +++ b/cmd/drone-matrix/config.go @@ -17,35 +17,35 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag { &cli.StringFlag{ Name: "username", EnvVars: []string{"PLUGIN_USERNAME", "MATRIX_USERNAME"}, - Usage: "sets username for authentication", + Usage: "authentication username", Destination: &settings.Username, Category: category, }, &cli.StringFlag{ Name: "password", EnvVars: []string{"PLUGIN_PASSWORD", "MATRIX_PASSWORD"}, - Usage: "sets password for authentication", + Usage: "authentication password", Destination: &settings.Password, Category: category, }, &cli.StringFlag{ Name: "userid", EnvVars: []string{"PLUGIN_USERID,PLUGIN_USER_ID", "MATRIX_USERID", "MATRIX_USER_ID"}, - Usage: "sets userid for authentication", + Usage: "authentication user id", Destination: &settings.UserID, Category: category, }, &cli.StringFlag{ Name: "accesstoken", EnvVars: []string{"PLUGIN_ACCESSTOKEN,PLUGIN_ACCESS_TOKEN", "MATRIX_ACCESSTOKEN", "MATRIX_ACCESS_TOKEN"}, - Usage: "sets access token for authentication", + Usage: "authentication access token", Destination: &settings.AccessToken, Category: category, }, &cli.StringFlag{ Name: "homeserver", EnvVars: []string{"PLUGIN_HOMESERVER", "MATRIX_HOMESERVER"}, - Usage: "sets matrix home server url to use", + Usage: "matrix home server url", Value: "https://matrix.org", Destination: &settings.Homeserver, Category: category, @@ -53,14 +53,14 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag { &cli.StringFlag{ Name: "roomid", EnvVars: []string{"PLUGIN_ROOMID", "MATRIX_ROOMID"}, - Usage: "sets roomid to send messages to", + Usage: "roomid to send messages to", Destination: &settings.RoomID, Category: category, }, &cli.StringFlag{ Name: "template", EnvVars: []string{"PLUGIN_TEMPLATE", "MATRIX_TEMPLATE"}, - Usage: "sets message template", + Usage: "message template", Value: "Build {{ build.Status }} [{{ repo.Owner }}/{{ repo.Name }}#{{ truncate commit.SHA 8 }}]({{ build.Link }}) ({{ build.Branch }}) by {{ commit.Author }}", Destination: &settings.Template, Category: category,