RDTK / generator

A tool for creating Jenkins jobs and other things from recipes describing software projects
GNU General Public License v3.0
21 stars 3 forks source link

Prioritize names and emails addresses specified in recipes #15

Closed scymtym closed 5 years ago

scymtym commented 5 years ago

Is your feature request related to a problem? Please describe.

Assume a person recipe like

name: foo

aliases:
  - bar
  - baz

identities:
  - mailto:foo@a.b
  - mailto:bar@a.b

When I call the generator like this:

build-generator report -k catalog -o /tmp/catalog-test 'PATH-TO-RECIPES/distributions/*.distribution'

the generated person/*.xml files often list automatically collected names and email addresses before the ones defined in the recipe:

<catalog …>
  <person>
    <name>some junk</name> <!-- bad -->
    <name>foo</name>
    <name>bar</name>
    <name>baz</name>
    …
    <email>somejunk@c.d</email> <!-- bad -->
    <email>foo@a.b</email>
    <email>bar@a.b</email>
  </person>
</catalog>

This causes the catalog to only display the automatically collected information.

Describe the solution you'd like

Information explicitly stated in the recipe should always take precedence over automatically collected information. In the above example, the output should be

<catalog …>
  <person>
    <name>foo</name>
    <name>bar</name>
    <name>baz</name>
    <name>some junk</name>
    …

    <email>foo@a.b</email>
    <email>bar@a.b</email>
    <email>somejunk@c.d</email>
  </person>
</catalog>