Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support metadata #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Support metadata #19

wants to merge 7 commits into from

Conversation

laedit
Copy link
Contributor

@laedit laedit commented Mar 5, 2015

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...d3fead4
  • Commits: [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

@avanderhoorn
Copy link
Owner

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

@laedit
Copy link
Contributor Author

laedit commented Mar 6, 2015

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.

@avanderhoorn
Copy link
Owner

Makes sense and I agree, lets see if any others have some feedback.

@laedit
Copy link
Contributor Author

laedit commented May 5, 2015

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?

@JakeGinnivan
Copy link

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//pull/19#issuecomment-99149029.

@laedit
Copy link
Contributor Author

laedit commented May 12, 2015

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?

@avanderhoorn
Copy link
Owner

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?

@laedit
Copy link
Contributor Author

laedit commented May 12, 2015

Yep, it is done that way in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include optional footer for commit range
3 participants