fix(new-plugin): Set only the last word of the credential name as the field name, if it's larger than seven characters#263
Merged
SimonBarendse merged 4 commits intoSep 22, 2023
Conversation
AndyTitu
approved these changes
May 23, 2023
AndyTitu
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this very well documented improvement! Lgtm
hculea
reviewed
May 23, 2023
Contributor
Author
jpcoenen
suggested changes
Jun 27, 2023
jpcoenen
left a comment
Member
There was a problem hiding this comment.
Thank you for improving the contribution framework! Improvements like these make our work so much easier in the long-term 😀
jpcoenen
approved these changes
Aug 17, 2023
jpcoenen
left a comment
Member
There was a problem hiding this comment.
One tiny remark, but pretty much good to go 🚀
…t's larger than seven characters
… it's clearer while reading the code, and prepend the rest of the words from credNameSplit, working backwards. More specifically, we also check if the second to the last word and the last word included are still lesser than the cutoff and use the second to the last word too, instead of just using the last word
…es successfully pass
d7791d8 to
59a5c55
Compare
Contributor
Author
|
Rebased with main to fix conflicts. |
SimonBarendse
approved these changes
Sep 22, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Prior to this change, when the credential name's last word is larger than seven characters, the field name generated by the "make new-plugin" template is empty.
With this change, the last word of the credential name is set as the field name. In the example below, field name
Credentialsis generated for the credential nameGitHub Access Credentials.If the last word is smaller than seven characters, the usual pattern of stitching together the last several words of the credential name (proposed originally on this PR #72) will be retained. In the example below, field name
API Keyis generated for the credential nameGitHub API Key.Type of change
Related Issue(s)
How To Test
make new-pluginChangelog
Set only the last word of the credential name as the field name, if it's larger than seven characters