adjust wording of the help texts

This commit is contained in:
Robert Kaussow 2022-05-29 22:22:48 +02:00
parent 80aa9c05c0
commit e1397811b0
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 13 additions and 13 deletions

View File

@ -1,22 +1,22 @@
--- ---
properties: properties:
username: 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 type: string
required: false required: false
password: password:
description: The authentication password. description: Authentication password.
type: string type: string
required: false required: false
user_id: 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 type: string
required: false required: false
access_token: access_token:
description: The authentication access token. description: Authentication access token.
type: string type: string
required: false required: false
@ -27,12 +27,12 @@ properties:
required: false required: false
roomid: roomid:
description: The Room ID to send messages to. description: Room ID to send messages to.
type: string type: string
required: false required: false
template: 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 }} defaultValue: build {{ build.status }} [{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
type: string type: string
required: false required: false

View File

@ -17,35 +17,35 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
&cli.StringFlag{ &cli.StringFlag{
Name: "username", Name: "username",
EnvVars: []string{"PLUGIN_USERNAME", "MATRIX_USERNAME"}, EnvVars: []string{"PLUGIN_USERNAME", "MATRIX_USERNAME"},
Usage: "sets username for authentication", Usage: "authentication username",
Destination: &settings.Username, Destination: &settings.Username,
Category: category, Category: category,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "password", Name: "password",
EnvVars: []string{"PLUGIN_PASSWORD", "MATRIX_PASSWORD"}, EnvVars: []string{"PLUGIN_PASSWORD", "MATRIX_PASSWORD"},
Usage: "sets password for authentication", Usage: "authentication password",
Destination: &settings.Password, Destination: &settings.Password,
Category: category, Category: category,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "userid", Name: "userid",
EnvVars: []string{"PLUGIN_USERID,PLUGIN_USER_ID", "MATRIX_USERID", "MATRIX_USER_ID"}, EnvVars: []string{"PLUGIN_USERID,PLUGIN_USER_ID", "MATRIX_USERID", "MATRIX_USER_ID"},
Usage: "sets userid for authentication", Usage: "authentication user id",
Destination: &settings.UserID, Destination: &settings.UserID,
Category: category, Category: category,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "accesstoken", Name: "accesstoken",
EnvVars: []string{"PLUGIN_ACCESSTOKEN,PLUGIN_ACCESS_TOKEN", "MATRIX_ACCESSTOKEN", "MATRIX_ACCESS_TOKEN"}, 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, Destination: &settings.AccessToken,
Category: category, Category: category,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "homeserver", Name: "homeserver",
EnvVars: []string{"PLUGIN_HOMESERVER", "MATRIX_HOMESERVER"}, EnvVars: []string{"PLUGIN_HOMESERVER", "MATRIX_HOMESERVER"},
Usage: "sets matrix home server url to use", Usage: "matrix home server url",
Value: "https://matrix.org", Value: "https://matrix.org",
Destination: &settings.Homeserver, Destination: &settings.Homeserver,
Category: category, Category: category,
@ -53,14 +53,14 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
&cli.StringFlag{ &cli.StringFlag{
Name: "roomid", Name: "roomid",
EnvVars: []string{"PLUGIN_ROOMID", "MATRIX_ROOMID"}, EnvVars: []string{"PLUGIN_ROOMID", "MATRIX_ROOMID"},
Usage: "sets roomid to send messages to", Usage: "roomid to send messages to",
Destination: &settings.RoomID, Destination: &settings.RoomID,
Category: category, Category: category,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "template", Name: "template",
EnvVars: []string{"PLUGIN_TEMPLATE", "MATRIX_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 }}", Value: "Build {{ build.Status }} [{{ repo.Owner }}/{{ repo.Name }}#{{ truncate commit.SHA 8 }}]({{ build.Link }}) ({{ build.Branch }}) by {{ commit.Author }}",
Destination: &settings.Template, Destination: &settings.Template,
Category: category, Category: category,