Skip to content

Separate each Custom Label entry on its own file when working with the "Source" format #1159

@AllanOricil

Description

@AllanOricil

Is your feature request related to a problem? Please describe.
Yes, it is really hard to track changes in the Custom Labels metadata file while reviewing PRs in any Git tool. It is hard to read changes in XML files in general.

What are you trying to do
Achieve better DX by improving the way we track changes to Custom Labels in GIT tools. This will reduce errors and will cut down time while reviewing PRs with Custom Labels changes.

Describe the solution you'd like
Separate each Custom Label entry on its own file when working with the "Source" format

This

<?xml version="1.0" encoding="UTF-8"?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">     
    <labels>
        <fullName>MyLabelApiName1</fullName>
        <categories>Community</categories>
        <language>en_US</language>
        <protected>false</protected>
        <shortDescription>MyLabelApiName1</shortDescription>
        <value>MyLabelApiName1</value>
    </labels>
    <labels>
        <fullName>MyLabelApiName2</fullName>
        <categories>Community</categories>
        <language>en_US</language>
        <protected>false</protected>
        <shortDescription>MyLabelApiName2</shortDescription>
        <value>MyLabelApiName2</value>
    </labels>
</CustomLabels>

Would become something like this

image

Describe alternatives you've considered

Right now every developer is appending new labels to the end of the file to make PR reviews easier and faster. This way we can clearly see what has been changed while reviewing PRs.

Additional context
It is impossible to review PRs when working with packages, such as Vlocity, that creates an enourmous number of Custom Labels. Git shows some labels were removed just because they moved down some lines, which is not true. This can lead to lots of errors.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions