Semantic-Release-Notes
Semantic-Release-Notes copied to clipboard
Support metadata
Proposal for the support of metadata and specifically commits (Fix #14).
All metadata can be preceded by its name (case insensitive) followed by a colon, but each supported metadata have it's own syntax.
Example For commits it's the first and last commits of the release separated by three dots and can be included in a link.
Input:
56af25a...d3fead4Commits: [56af25a...d3fead4](https://github.com/Glimpse/Semantic-Release-Notes/compare/56af25a...d3fead4)
Result:
{
"metadata" : [ {
"name" : "Commits",
"data" : "56af25a...d3fead4"
}, {
"name" : "Commits",
"data" : "[56af25a...d3fead4](https://github.com/Glimpse/Semantic-Release-Notes/compare/56af25a...d3fead4)"
} ],
"summary" : ""
}
Html:
Commits: 56af25a...d3fead4 Commits: 56af25a...d3fead4
To clarify, in the above case, are you proposing that metadata can work in two ways:
- Firstly, that the parser can be extended to look for special cases and pull that data out as metadata
- Secondly, that one can provide a "list" at the bottom of each release that allows for arbitrary metadata to be defined without the need for an extension
I was proposing only the first way, each supported metadata must be understanded by the parser.
It is possible to support the second, but in that case it means that the summary of the release must be at the top.
I don't know if it's a good thing.
Makes sense and I agree, lets see if any others have some feedback.
I have added the missing metadata contributors, source, binaries and generated at. The metadata name is mandatory for contributors, source and binaries since the content is not sufficient to recognize the metadata. @avanderhoorn, @jakeginnivan, is it ok for you?
Just checking, the metadata itself is optional? Just the keys have to match for them to be recognized, right?
From: Jérémie Bertrand [mailto:[email protected]] Sent: 05 May 2015 18:24 To: Glimpse/Semantic-Release-Notes Cc: Jake Ginnivan Subject: Re: [Semantic-Release-Notes] Support metadata (#19)
I have added the missing metadata contributors, source, binaries and generated at. The metadata name is mandatory for contributors, source and binaries since the content is not sufficient to recognize the metadata. @avanderhoornhttps://github.com/avanderhoorn, @jakeginnivanhttps://github.com/jakeginnivan, is it ok for you?
— Reply to this email directly or view it on GitHubhttps://github.com/Glimpse/Semantic-Release-Notes/pull/19#issuecomment-99149029.
All metadata are optionals. For certain metadata like commits and generated at, the data itself is sufficient on its own (but they have to be on their own line) to be recognized as metadata. Or do you prefer that the key is always mandatory?
I think the metadata should be 100% optional and that any combination of keys (if you do choose to use metadata) is possible - i.e. you can choose to use any 1 or 2. Does that match up with others thinking?
Yep, it is done that way in the PR.