File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -189,15 +189,22 @@ func newPlugin() error {
189189 }
190190 }
191191
192- // As a placeholder, assume the field name is the short version (max 7 chars) of the credential name, starting
193- // from the last word. For example:
192+ // As a placeholder, assume the field name is the short version (max 7 chars) of the credential name, starting from the last word.
193+ //
194+ // For example:
194195 // "Personal Access Token" => "Token"
195196 // "Secret Key" => "Key"
196197 // "API Key" => "API Key"
198+ //
199+ // When the last word of the credential name is greater than seven characters, the last word is used as the field name
197200 var fieldNameSplit []string
198201 lengthCutoff := 7
199202 for i := range credNameSplit {
200203 word := credNameSplit [len (credNameSplit )- 1 - i ]
204+ if i == 0 {
205+ fieldNameSplit = append ([]string {word }, fieldNameSplit ... )
206+ continue
207+ }
201208 if len (strings .Join (append (fieldNameSplit , word ), " " )) > lengthCutoff {
202209 break
203210 }
You can’t perform that action at this time.
0 commit comments