Notify GitLab Plugin: add shortDescription option #558
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.
What does this change?
It adds the option
shortDescription
to the Notify GitLab Plugin. I took the liberty of copying the implementation from the GitHub 'with API' plugin, which already did exactly what I was looking for.I used a new config parameter for the plugin and then passed it through from the
GitLabNotifierPlugin
class to the functions inuse-cases.ts
and then to the config object for the comment function. This adds the name of the new parameter in a lot of places in those files, which may look a bit messy. However, the only alternative I could think of was adding it to thenotifyParams
. Doing that potentially impacts code in other places, which I thought was a bit overkill.Let me know if you'd rather see it added to
notifyParams
.In addition to the changes, I added tests to the files that I changed, covering all lines, branches, et cetera.
References
N/A
Screenshots
N/A
What can I check for bug fixes?
N/A - No bugs.
The functional change is: set
shortDescription
totrue
. The comment posted to GitLab will then be a short table summary instead of a sea of coloured icons.