Fill default suggestion commit message values in the placeholder instead of showing the variable slugs
What does this MR do?
For #291027 (closed)
This MR fills in variables in the default commit message for suggestions.
Administrators can define a default commit message suggestion, and use variables (like %{project_name}
) in the default.
This MR actually interpolates those variables into the placeholder so that if a user chooses to not fill in the message (and thus use the default), they can see what it will look like.
Known Issues
The way we've implemented this (by providing many of the details via diffs_metadata.json
, and others via the file itself), we cannot do most of this interpolation outside of the Changes tab.
Overview Tab Suggestions don't have an attached file, and they don't have the diffs_metadata.json information |
---|
This was an oversight when we were first planning this feature, and we'll need to consider some other way to load the pertinent data for locations other than the Changes tab.
I've opened #300749 (closed) to address suggestions outside the MR Diffs App / Changes tab.
Screenshots (strongly suggested)
Before | After |
---|---|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team