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

Add scripts to automated release process and validate commit messages #373

Closed
wants to merge 3 commits into from
Closed

Conversation

alrra
Copy link
Contributor

@alrra alrra commented Jul 10, 2017

I know this is a bigger PR, but the commits in it are related (and kinda depend) no each other.

Changes (see commit messages for more details):

  • Added script to automate release process.

  • Added script to validate commit message.

    • when the user goes git commit, she/we will see something like:

    • if the commit message doesn't respect the structure we imposed, the commit will fail and the user will see the list of problems:
      e.g. for

      Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates voluptas?
      Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates voluptas?
      Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates voluptas?

  • Added pull request related guidelines

Add release script that upon invocation will:

* Update the `CHANGELOG.md`.
* Commit and tag a new (semantic) version based on commits.
* Push changes upstream.
* Create a new release.
* Publish a new version on `npm`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #345
Fix #346
1) Add script to validate commit messages. Make it execute (using
   the `commit-msg` hook) before the commit is allowed to go through,
   thus, allowing to reject the commit if its message dosn't respect
   the conventions.

2) Add script to provide (using `prepare-commit-msg` hook) additional
   information on the expected form of the commit message, in the commit
   message

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_committing_workflow_hooks

Ref #345
@alrra alrra requested review from a team and qzhou1607-zz and removed request for a team July 10, 2017 14:26
# Pull Requests

Contributing code to `sonar` is done using pull requests, This is
the fastest way for us to evaluate your code and to merge it into
Copy link
Member

Choose a reason for hiding this comment

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

Lower case t for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intent was to have . instead of ,.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

<!-- markdownlint-enable MD033 -->

Before you send the pull request, be sure to rebase onto the [upstream
source](../development-environment), . This ensures your code is running
Copy link
Member

Choose a reason for hiding this comment

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

There is a comma and a dot together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

This is a step-by-step guide to setting up a local development
environment that will let you contribute back to the project.

## Step 1: Install Node.js
Copy link
Member

Choose a reason for hiding this comment

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

The pull request doc has anchors in the titles. Do we want them here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't add them because the list was kinda small, but let's do it.

## Step 1: Install Node.js

Go to [`nodejs.org`](https://nodejs.org/en/download/) to download
and install the latest stable version of `Node.js` for your operating
Copy link
Member

Choose a reason for hiding this comment

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

Node 8.0 is not yet LTS. Maybe we should make a mention to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alrra
Copy link
Contributor Author

alrra commented Jul 10, 2017

@molant I've addressed all your feedback.

@alrra alrra closed this in 52bb663 Jul 10, 2017
@alrra alrra deleted the fix-346 branch July 10, 2017 17:38
alrra added a commit that referenced this pull request Jul 13, 2017
@qzhou1607-zz
Copy link
Contributor

Proof of working on smartgit as well!

fail-commit

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.

3 participants