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

chore: release 1.0.0 of specification #175

Merged
merged 6 commits into from
Sep 30, 2019
Merged

chore: release 1.0.0 of specification #175

merged 6 commits into from
Sep 30, 2019

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Aug 14, 2019

I would like to advocate releasing version 1.0.0 of Conventional Commits.

Reasoning

  • we've been working on the project for ~3 years, and I think it's reached healthy maturity.
  • the specification is being used in the wild for a variety of major open source projects (yargs, electron, Istanbul) and folks seem happy.
  • we've seen adoption of Conventional Commits across a variety of languages (as an example we're using it for PHP, JavaScript, and Java at Google) demonstrating that the spec in its current form appeals to more than just JavaScript.
  • the convention has reached a healthy point of stability (since introducing ! (which is working great) there haven't been other major updates).

Let's Practice What We Preach

Releasing a 1.0.0 version of the specification doesn't mean that we can't iterate, it just means that we drop the ugly beta/alpha suffix and start following SemVer for updates to the specification.

CC: @tommywo, @jbottigliero

content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Show resolved Hide resolved
@stevemao
Copy link
Member

I think it would be good to include revert just for completeness. #88

@Mouvedia
Copy link

build and ci should be listed there:

1. Others: commit _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `chore:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.

@bcoe
Copy link
Contributor Author

bcoe commented Aug 14, 2019

@stevemao left a comment on the revert discussion. I think we should explicitly call out revert: in FAQ, with a recommendation that someone use Refs: to indicate the PR or SHA being reverted.

@JeanMertz
Copy link

JeanMertz commented Aug 14, 2019

Hey @bcoe, I can't dive into this too deep right now, but I just noticed you created this PR, and wanted to link you to an issue on a project of mine in which I'm working on a parser for Conventional Commit.

I think the contents of that discussion might be interesting to you. Not sure if it'll make any difference in whatever ends up getting merged as v1.0.0, but at the very least it might give you some new insights.

rustic-games/conventional-commit#1 (comment)

(the parser is used in another library, Jilu, to auto-generate a change log based on conventional commits, which is why being able to correctly parse breaking changes (and possibly other metadata) is important to get right)

@Mouvedia
Copy link

Mouvedia commented Aug 14, 2019

to indicate the PR or SHA being reverted

@bcoe Instead of the # of the PR or MR, I would instead recommend to reference the merge commit or a range of commits or the branch if it still exists.

@damianopetrungaro
Copy link
Member

@Mouvedia feel free to open an issue and work on a PR about it :D
#175 (comment)

@damianopetrungaro
Copy link
Member

@Mouvedia it is totally up to the userland to specify it IMHO.
The important thing is that it respects the specs

#175 (comment)

epage referenced this pull request in rustic-games/conventional-commit Aug 16, 2019
> If included in the type/scope prefix, breaking changes MUST be
> indicated by a `!` immediately before the `:`.

To support this, you can now access `commit.breaking()` to get a boolean
signaling if the commit contains breaking changes.

You can still access `commit.breaking_change()` to get any optional
message provided using the `BREAKING CHANGE: ` paragraph.

If no `!` is provided, but the commit does contain a `BREAKING CHANGE`
paragraph, the `commit.breaking()` method will also return `true`.

While the API is a bit awkward right now due to having `breaking` _and_
`breaking_change`, this is only temporarily, until Git trailers are
implemented, and the special `breaking_change` method will be removed in
favor of a generic map of trailer key/values with one of those trailers
having the key `BREAKING CHANGE`.
@bcoe
Copy link
Contributor Author

bcoe commented Aug 20, 2019

@damianopetrungaro I think @JeanMertz has put together a very sound proposal for eliminating ambiguity around body vs., footer. @JeanMertz, perhaps make a PR against this branch adding some of your edits?

I'm less convinced that we need to strictly define the behavior around revert, beyond giving some sound recommendations in the FAQ.

@bcoe bcoe changed the title chore: release 1.0 of specification chore: release 1.0.0 of specification Sep 7, 2019
@bcoe
Copy link
Contributor Author

bcoe commented Sep 7, 2019

I think it would be good to include revert just for completeness.

@Mouvedia @stevemao I've added an FAQ section providing suggestions for handling reverts, based on the angular convention.

For releasing v1.0.0 of this specification, I'd like to argue that this is a reasonable start (we can expand on it further in the future if we want to support Revert "feat: foo", but I have fears that we're adding a lot of complexity to the spec, for a situation that's fairly rare).

Breaking changes MUST be described, but body is optional, therefore BREAKING CHANGES: in body shouldn't be mandatory.

@tommywo @damianopetrungaro I think we've done a good job of word-smithing the relationship between ! and the BREAKING CHANGE footer in #185.

regarding body ambiguity

@epage @JeanMertz, with your help I think we've done a much better job of making the difference between footers and body well defined.


So what do folks say, shall we get this to v1.0.0? (keeping in mind we an always release v1.0.1 35 minutes later.)

Copy link

@JeanMertz JeanMertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice improvements to the spec. Looking forward to seeing this merged. I left a few comments, but nothing blocking.

content/next/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Show resolved Hide resolved
content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Outdated Show resolved Hide resolved
content/v1.0.0/index.md Show resolved Hide resolved
@@ -2,7 +2,7 @@
draft: true
---

# Conventional Commits 1.0.0
# Conventional Commits 1.0.1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about the patch?

Copy link
Member

@zeke zeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ 1️⃣ ✨

@bcoe
Copy link
Contributor Author

bcoe commented Sep 17, 2019

Haven't forgotten about this, have just been swamped 😆

@damianopetrungaro you're comfortable with landing this once I address comments?

@damianopetrungaro
Copy link
Member

@bcoe sure I am!
It looks good, there are all already comments for thing to review and change 😄

Thanks for pushing it forward! 💪

@bcoe bcoe merged commit 73c252d into master Sep 30, 2019
@bcoe bcoe deleted the one-point-oh branch September 30, 2019 04:11
@tunnckoCore
Copy link
Member

tunnckoCore commented Sep 30, 2019

Ahhhhhhh... Sadly, couldn't get sooner to that, nor pinged... Just was reading it when you merged it and was going to point a few things:

  • 12 and 13 could be 11.1 and 11.2 instead;
  • So, no switching the places of "optional scope" and "optional bang"? I think we commented around that somewhere? 🤔
    • feat!: foo bar and feat!(cli): something
    • it looks and feels better, and familiar to function invocation syntax of some languages (Rust, first in mind). Yea, CC isn't a programming language to be similar, but still, it feels good on eyes. As dev creatures, I think that we appreciate such little things.
  • Definitely don't like the language around "footers". It's a single footer with possibly multiple trailers. Why not inherit that language from the git trailers, but instead calling it "multiple footers"? It sounds strange.
  • Don't think that Acked-by is the best example. Probably Reviewed-by or Signed-off-by are better choices.

@bcoe
Copy link
Contributor Author

bcoe commented Sep 30, 2019

@tunnckoCore if you look at the final edit that landed, we refer to things as "multiple footers" not as trailers (we only reference tailers a couple times, pointing out that they inspired the footer parser).

For the other minor changes, send a patch and we can release 1.0.1 (would be worth doing ASAP before translations start to roll in).

@Mouvedia
Copy link

Probably Reviewed-by or Signed-off-by are better choices.

@tunnckoCore I think a better example would be Co-authored-by:.

@tunnckoCore
Copy link
Member

tunnckoCore commented Sep 30, 2019

@bcoe: if you look at the final edit that landed

Exactly, that's my proble 😆 I don't like it and sounds me strange. It would be better to just follow the git trailers language: "Multiple trailers inside a single footer. And what's a footer? Well, it starts where the first trailer starts. What's body? It begins after the first line, and ends where the footer starts (first found trailer)".

@bcoe: For the other minor changes

Yep.

@Mouvedia: I think a better example would be Co-authored-by:

Agree, haha.

@bcoe
Copy link
Contributor Author

bcoe commented Sep 30, 2019

@tunnckoCore I think we're different enough from trailers, that I kind of agreed with @JeanMertz's recommendation to not tie us to them too tightly.

@tunnckoCore
Copy link
Member

tunnckoCore commented Sep 30, 2019

I don't see any difference. Each token/value pair is a trailer. What's the difference between "multiple footers" and "git trailers"? In abstract world, they are childs of a footer.

                  CommitMessage
              /          |        \
           /             |           \
       Header           Body           Footer
     /   |   \           |               |  
type  scope  subject   paragraphs      trailers

* "subject" is officially called description


Example commit message:

feat: meow meow, yawn

foo qux

bar
var

zero barry
deal

Reviewed-by: Zzz oops
Some-thing: Multiline important

trailer woohoo
meow meow

Why not?
yup!

Signed-off-by: Foo <bar@qux.com>

Parsed to object:

const commit = {
  header: {
    type: 'feat',
    scope: null,
    subject: 'meow meow, yawn'
  },
  body: 'foo qux\n\nbar\nvar\n\nzero barry\ndeal',
  footer: {
    trailers: [
      'Reviewed-by: Zzz oops',
      'Some-thing: Multiline important\n\ntrailer woohoo\nmeow meow\n\nWhy not?\nyup!',
      'Signed-off-by: Foo <bar@qux.com>'
    ],
    trailer: {
      'Reviewed-by': 'Zzz ooops',
      'Some-thing': 'Multiline important\n\ntrailer woohoo\nmeow meow\n\nWhy not?\nyup!',
      'Signed-off-by': 'Foo <bar@qux.com>',
    },
    raw: `Reviewed-by: Zzz oops
Some-thing: Multiline important

trailer woohoo
meow meow

Why not?
yup!

Signed-off-by: Foo <bar@qux.com>`,
  },
};

In the commit.footer object, some more advanced parser, could add more things such as mentions, references (based on trailers), and etc.

@bcoe
Copy link
Contributor Author

bcoe commented Sep 30, 2019

@tunnckoCore could you please open several issues for these conversations, rather than commenting on a closed pull request?

JeanMertz added a commit to rustic-games/conventional-commit that referenced this pull request Nov 10, 2019
The current implementation accepts compound nouns as types, but the
first version of the spec is about to be released[1], and explicitly
requires the type to be a noun.

[1]: conventional-commits/conventionalcommits.org#175
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.

None yet

8 participants