8000 doc: update docs on semantic requirements for #13359 by MarshallOfSound · Pull Request #13365 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

doc: update docs on semantic requirements for #13359 #13365

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

Merged
merged 1 commit into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Contributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTIN
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/master/docs/development/testing.md)
- [ ] relevant documentation is changed or added
- [ ] commit messages or PR title follow semantic [commit guidelines](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines)
- [ ] PR title follows semantic [commit guidelines](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines)
2 changes: 1 addition & 1 deletion .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ newIssueWelcomeComment: |
newPRWelcomeComment: |
💖 Thanks for opening this pull request! 💖

We use [semantic commit messages](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines) to streamline the release process. Before your pull request can be merged, you should **update your pull request title** to start with a semantic prefix, OR prefix at least one of your commit messages.
We use [semantic commit messages](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines) to streamline the release process. Before your pull request can be merged, you should **update your pull request title** to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

Expand Down
6 changes: 2 additions & 4 deletions docs/development/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ A good commit message should describe what changed and why. The Electron project
uses [semantic commit messages](https://conventionalcommits.org/) to streamline
the release process.

Before a pull request can be merged, it should include at least one semantic
commit message, though it's not necessary for all commits in the pull request
to be semantic. Alternatively, you can **update your pull request title** to
start with a semantic prefix.
Before a pull request can be merged, it **must** have a pull request title with a semantic prefix.

Examples of commit messages with semantic prefixes:

Expand All @@ -108,6 +105,7 @@ Common prefixes:
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (linting)
- vendor: Bumping a dependency like libchromiumcontent or node

Other things to keep in mind when writing a commit message:

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/electron-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ We reconcile flagged code with our versioning strategy as follows:

We seek to increase clarity at all levels of the update and releases process. Starting with `2.0.0` we will require pull requests adhere to the [Conventional Commits](https://conventionalcommits.org/) spec, which can be summarized as follows:

* Commits that would result in a semver **major** bump must start with `BREAKING CHANGE:`.
* Commits that would result in a semver **major** bump must start their body with `BREAKING CHANGE:`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: what is commit's body? Commit message?

Copy link
Member Author

Choose a reason for hiding this comment

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

@tonyganch I think that normally the commit message is the first line of the commit text (normally less than 80 chars) and the body is everything after that.

This right here is the commit message

Here you would add more details in the body

* Maybe
* Some 
* Bullet points

And so on

Copy link
Contributor

Choose a reason for hiding this comment

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

@MarshallOfSound I've already thought that the first line is a "message's summary/subject" and the rest (after an empty line) is a "message's body".

https://chris.beams.io/posts/git-commit/

Copy link
Contributor

Choose a reason for hiding this comment

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

Related: The semantic-pull-requests bot is now using the parse-commit-message module to validate commits. The API docs for that module explain commit terminology well: https://github.com/tunnckoCore/parse-commit-message#api

const { parse } = require('parse-commit-message');

const commitMsg1 = `feat(ng-list): Allow custom separator
bla bla bla

BREAKING CHANGE: some breaking change.
Thanks @foobar
`;

const commit = parse(commitMsg1);
console.log(commit);
// => { type: 'feat',
//   scope: 'ng-list',
//   subject: 'Allow custom separator',
//   header: 'feat(ng-list): Allow custom separator',
//   body: 'bla bla bla',
//   footer: 'BREAKING CHANGE: some breaking change.\nThanks @stevemao' }

* Commits that would result in a semver **minor** bump must start with `feat:`.
* Commits that would result in a semver **patch** bump must start with `fix:`.

* We allow squashing of commits, provided that the squashed message adheres the the above message format.
* It is acceptable for some commits in a pull request to not include a semantic prefix, as long as a later commit in the same pull request contains a meaningful encompassing semantic message.
* It is acceptable for some commits in a pull request to not include a semantic prefix, as long as the pull request title contains a meaningful encompassing semantic message.

# Versionless `master`

Expand Down
0