New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(new-plugin): Set only the last word of the credential name as the field name, if it's larger than seven characters #263
fix(new-plugin): Set only the last word of the credential name as the field name, if it's larger than seven characters #263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this very well documented improvement! Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving the contribution framework! Improvements like these make our work so much easier in the long-term 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Rebased with main to fix conflicts. |
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
Credentials
is 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 Key
is generated for the credential nameGitHub API Key
.Type of change
Related Issue(s)
How To Test
make new-plugin
Changelog
Set only the last word of the credential name as the field name, if it's larger than seven characters