Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wagoid/commitlint-github-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2
Choose a base ref
...
head repository: wagoid/commitlint-github-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3
Choose a head ref

Commits on Feb 24, 2021

  1. fix(deps): udpate commitlint monorepo to v12

    BREAKING CHANGE: Remove support for lerna v2 and change the order of the `extends` resolution
    from right-to-left to left-to-right.
    
    Closes #97.
    jdbruijn committed Feb 24, 2021
    Copy the full SHA
    8b0b095 View commit details
  2. Copy the full SHA
    8b0212a View commit details
  3. Merge pull request #99 from wagoid/fix/deps-commitlint

    fix(deps): udpate commitlint monorepo to v12
    jdbruijn authored Feb 24, 2021
    Copy the full SHA
    cb649cc View commit details
  4. chore(release): publish 3.0.0 [skip-ci]

    GitHub Action committed Feb 24, 2021
    Copy the full SHA
    8752887 View commit details

Commits on Feb 25, 2021

  1. Copy the full SHA
    657daf2 View commit details
  2. Copy the full SHA
    dbaa380 View commit details
  3. Copy the full SHA
    a0b2acf View commit details
  4. ci: run npm ci to install and ignore scripts (#104)

    * ci: run `npm ci` to install and ignore scripts
    
    `npm ci` is meant to be used in CI environments and the scripts are ignored to prevent e.g. Husky
    from being installed in the CI environment. See https://docs.npmjs.com/cli/v7/commands/npm-ci.
    
    * ci: run `npm ci` to install and ignore scripts in the Dockerfile
    jdbruijn authored Feb 25, 2021
    Copy the full SHA
    e03ee8e View commit details
  5. chore(release): publish 3.0.1 [skip-ci]

    GitHub Action committed Feb 25, 2021
    Copy the full SHA
    51eac66 View commit details

Commits on Mar 1, 2021

  1. chore(deps-dev): bump husky from 5.0.9 to 5.1.2

    Bumps [husky](https://github.com/typicode/husky) from 5.0.9 to 5.1.2.
    - [Release notes](https://github.com/typicode/husky/releases)
    - [Commits](typicode/husky@v5.0.9...v5.1.2)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 1, 2021
    Copy the full SHA
    694b231 View commit details
  2. Copy the full SHA
    4ba39da View commit details
  3. Copy the full SHA
    ea75af2 View commit details
  4. chore(deps): bump actions/setup-node from v2.1.4 to v2.1.5

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.4 to v2.1.5.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](actions/setup-node@v2.1.4...46071b5)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 1, 2021
    Copy the full SHA
    cc0bfa0 View commit details

Commits on Mar 2, 2021

  1. Merge pull request #105 from wagoid/dependabot/npm_and_yarn/husky-5.1.2

    chore(deps-dev): bump husky from 5.0.9 to 5.1.2
    wagoid authored Mar 2, 2021
    Copy the full SHA
    8a8fed8 View commit details
  2. chore(release): publish 3.0.2 [skip-ci]

    GitHub Action committed Mar 2, 2021
    Copy the full SHA
    e29b0ee View commit details
  3. Merge pull request #106 from wagoid/dependabot/npm_and_yarn/commitlin…

    …t-plugin-function-rules-1.3.2
    
    chore(deps-dev): bump commitlint-plugin-function-rules from 1.1.20 to 1.3.2
    wagoid authored Mar 2, 2021
    Copy the full SHA
    9af51f6 View commit details
  4. chore(release): publish 3.0.3 [skip-ci]

    GitHub Action committed Mar 2, 2021
    Copy the full SHA
    c1d05d0 View commit details
  5. Merge pull request #119 from wagoid/dependabot/github_actions/actions…

    …/setup-node-v2.1.5
    
    chore(deps): bump actions/setup-node from v2.1.4 to v2.1.5
    wagoid authored Mar 2, 2021
    Copy the full SHA
    0f18a3c View commit details
  6. Merge pull request #118 from wagoid/dependabot/npm_and_yarn/standard-…

    …version-9.1.1
    
    chore(deps-dev): bump standard-version from 9.1.0 to 9.1.1
    wagoid authored Mar 2, 2021
    Copy the full SHA
    683cc28 View commit details
  7. chore(release): publish 3.0.4 [skip-ci]

    GitHub Action committed Mar 2, 2021
    Copy the full SHA
    7954593 View commit details
  8. chore(deps-dev): bump eslint from 7.20.0 to 7.21.0

    Bumps [eslint](https://github.com/eslint/eslint) from 7.20.0 to 7.21.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
    - [Commits](eslint/eslint@v7.20.0...v7.21.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 2, 2021
    Copy the full SHA
    c700a36 View commit details
  9. fix: perform an atomic push when releasing

    This avoids the following error:
    "Updates were rejected because the tip of your current branch is behind its remote counterpart"
    This happens when a PR is merged while release is in progress.
    wagoid committed Mar 2, 2021
    Copy the full SHA
    9d00d1e View commit details
  10. Merge pull request #114 from wagoid/dependabot/npm_and_yarn/eslint-7.…

    …21.0
    
    chore(deps-dev): bump eslint from 7.20.0 to 7.21.0
    wagoid authored Mar 2, 2021
    Copy the full SHA
    66c928d View commit details
  11. chore(release): publish 3.0.5 [skip-ci]

    GitHub Action committed Mar 2, 2021
    Copy the full SHA
    f92748f View commit details
  12. Merge pull request #120 from wagoid/ci/use-atomic-pushes

    fix: perform an atomic push when releasing
    wagoid authored Mar 2, 2021
    Copy the full SHA
    ca2b1bb View commit details
  13. chore(release): publish 3.0.6 [skip-ci]

    GitHub Action committed Mar 2, 2021
    Copy the full SHA
    b50220d View commit details

Commits on Apr 1, 2021

  1. chore(deps-dev): bump husky from 5.1.2 to 6.0.0 (#123)

    Bumps [husky](https://github.com/typicode/husky) from 5.1.2 to 6.0.0.
    - [Release notes](https://github.com/typicode/husky/releases)
    - [Commits](typicode/husky@v5.1.2...v6.0.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 1, 2021
    Copy the full SHA
    e6050db View commit details
  2. chore(deps-dev): bump yaml from 1.10.0 to 1.10.2 (#126)

    Bumps [yaml](https://github.com/eemeli/yaml) from 1.10.0 to 1.10.2.
    - [Release notes](https://github.com/eemeli/yaml/releases)
    - [Commits](eemeli/yaml@v1.10.0...v1.10.2)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 1, 2021
    Copy the full SHA
    a164903 View commit details
  3. chore(deps-dev): bump eslint from 7.21.0 to 7.23.0 (#125)

    Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.23.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
    - [Commits](eslint/eslint@v7.21.0...v7.23.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 1, 2021
    Copy the full SHA
    5edbbad View commit details
  4. chore(release): publish 3.0.7 [skip-ci]

    GitHub Action committed Apr 1, 2021
    Copy the full SHA
    176bb3d View commit details

Commits on Apr 5, 2021

  1. Copy the full SHA
    9c4a2f8 View commit details
  2. Merge pull request #131 from wagoid/docs/use-v3-action

    docs: use v3 action on README.md
    wagoid authored Apr 5, 2021
    Copy the full SHA
    4fbd5be View commit details
  3. chore(release): publish 3.0.8 [skip-ci]

    GitHub Action committed Apr 5, 2021
    Copy the full SHA
    ab798dd View commit details
  4. feat: add support for pull_request_target event

    Previously, the action was treating pull_request_target event as a regular push,
    which was causing some issues.
    wagoid committed Apr 5, 2021
    Copy the full SHA
    de51303 View commit details

Commits on Apr 6, 2021

  1. Merge pull request #135 from wagoid/feat/pull-request-target-event

    feat: add support for pull_request_target event
    wagoid authored Apr 6, 2021
    Copy the full SHA
    1338299 View commit details
  2. chore(release): publish 3.1.0 [skip-ci]

    GitHub Action committed Apr 6, 2021
    Copy the full SHA
    1c603de View commit details

Commits on May 4, 2021

  1. Copy the full SHA
    ae7ecde View commit details
  2. Merge pull request #152 from sschuberth/patch-1

    README: Add a link to the commitlink project
    wagoid authored May 4, 2021
    Copy the full SHA
    b9ec86a View commit details
  3. chore(release): publish 3.1.1 [skip-ci]

    GitHub Action committed May 4, 2021
    Copy the full SHA
    6fc8cf6 View commit details

Commits on May 8, 2021

  1. chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#153)

    Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
    - [Release notes](https://github.com/wycats/handlebars.js/releases)
    - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
    - [Commits](handlebars-lang/handlebars.js@v4.7.6...v4.7.7)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 8, 2021
    Copy the full SHA
    848037f View commit details
  2. chore(release): publish 3.1.2 [skip-ci]

    GitHub Action committed May 8, 2021
    Copy the full SHA
    f18b9d0 View commit details

Commits on May 10, 2021

  1. chore(deps): bump lodash from 4.17.20 to 4.17.21 (#154)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.20...4.17.21)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 10, 2021
    Copy the full SHA
    7bd8b29 View commit details
  2. chore(release): publish 3.1.3 [skip-ci]

    GitHub Action committed May 10, 2021
    Copy the full SHA
    a23ae3c View commit details

Commits on May 18, 2021

  1. Copy the full SHA
    4874b95 View commit details
  2. Copy the full SHA
    203ccfe View commit details

Commits on May 19, 2021

  1. Merge pull request #158 from rizet/master

    docs: resolve ambiguities
    wagoid authored May 19, 2021
    Copy the full SHA
    cdbc702 View commit details
  2. chore(release): publish 3.1.4 [skip-ci]

    GitHub Action committed May 19, 2021
    Copy the full SHA
    baffd3c View commit details
Showing with 8,261 additions and 9,100 deletions.
  1. +1 −0 .dockerignore
  2. +10 −0 .eslintignore
  3. +2 −1 .github/tasks/actionYamlUpdater.js
  4. +5 −5 .github/workflows/ci.yml
  5. +4 −4 .github/workflows/commitlint.yml
  6. +1 −0 .husky/.gitignore
  7. +3 −0 .husky/commit-msg
  8. +3 −0 .husky/pre-commit
  9. +1 −1 .lintstagedrc.js
  10. +48 −0 CHANGELOG.md
  11. +1 −1 Dockerfile
  12. +7 −3 README.md
  13. +1 −1 action.yml
  14. +4 −0 fixtures/lerna-scopes/package.json
  15. +8,081 −9,000 package-lock.json
  16. +17 −22 package.json
  17. +4 −1 src/action.js
  18. +64 −59 src/action.test.js
  19. +4 −2 src/testUtils.js
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -7,4 +7,5 @@ coverage
fixtures
src/action.test.js
src/testUtils.js
.eslintignore
.eslintrc.json
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git/
.vscode
/build/
/dist/
/coverage/
/LICENSE.md
/modules/
/node_modules/
/worktrees/
!.*
3 changes: 2 additions & 1 deletion .github/tasks/actionYamlUpdater.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const yaml = require('yaml')

yaml.scalarOptions.str.fold.lineWidth = 100

const versionRegex = /\d+\.\d+\.\d+/

module.exports.readVersion = contents =>
module.exports.readVersion = (contents) =>
yaml.parse(contents).runs.image.match(versionRegex)[0]

module.exports.writeVersion = (contents, version) => {
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.4
- uses: actions/setup-node@v2.1.5
with:
node-version: '12.x'
- uses: actions/cache@v2.1.4
@@ -18,7 +18,7 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci --ignore-scripts
- run: npm run lint
- run: npm test -- --ci --coverage
release:
@@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2.1.4
- uses: actions/setup-node@v2.1.5
with:
node-version: '12.x'
- uses: actions/cache@v2.1.4
@@ -42,7 +42,7 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci --ignore-scripts
- name: Configure git user
run: |
git config user.email 'github-action@users.noreply.github.com'
@@ -64,7 +64,7 @@ jobs:
- name: Push to docker registry
run: |
docker push $DOCKER_REGISTRY_URL/wagoid/commitlint-github-action:$VERSION
- run: git push --follow-tags origin master
- run: git push --atomic --follow-tags origin master
- name: Create a git tag for the major version
run: |
major=`echo $VERSION | sed -E 's/([0-9]+)(.+)/\1/'`
8 changes: 4 additions & 4 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- run: sed -i -E "s/(docker:.+)/Dockerfile/" ./action.yml
- run: echo -n '' > .dockerignore
- uses: actions/setup-node@v2.1.4
- uses: actions/setup-node@v2.1.5
with:
node-version: '14'
- uses: actions/cache@v2.1.4
@@ -21,7 +21,7 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci --ignore-scripts
- uses: ./
id: run_commitlint
env:
@@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2.1.4
- uses: actions/setup-node@v2.1.5
with:
node-version: '14'
- uses: actions/cache@v2.1.4
@@ -46,7 +46,7 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci --ignore-scripts
- uses: ./
env:
NODE_PATH: ${{ github.workspace }}/node_modules
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx --no-install commitlint --edit "${1}"
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx --no-install lint-staged
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
'*.{ts,tsx,vue,css,less,scss,html,htm,md,markdown}': 'prettier --write',
'*.{json,yml,yaml}': ['prettier --write', () => 'npm run test'],
'*.{js,jsx}': ['eslint --fix', () => 'npm run test']],
'*.{js,jsx}': ['eslint --fix', () => 'npm run test'],
}
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,54 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [3.1.4](https://github.com/wagoid/commitlint-github-action/compare/v3.1.3...v3.1.4) (2021-05-19)

### [3.1.3](https://github.com/wagoid/commitlint-github-action/compare/v3.1.2...v3.1.3) (2021-05-10)

### [3.1.2](https://github.com/wagoid/commitlint-github-action/compare/v3.1.1...v3.1.2) (2021-05-08)

### [3.1.1](https://github.com/wagoid/commitlint-github-action/compare/v3.1.0...v3.1.1) (2021-05-04)

## [3.1.0](https://github.com/wagoid/commitlint-github-action/compare/v3.0.8...v3.1.0) (2021-04-06)


### Features

* add support for pull_request_target event ([de51303](https://github.com/wagoid/commitlint-github-action/commit/de513030467551ee03fb8827bd790967fd5818ab))

### [3.0.8](https://github.com/wagoid/commitlint-github-action/compare/v3.0.7...v3.0.8) (2021-04-05)

### [3.0.7](https://github.com/wagoid/commitlint-github-action/compare/v3.0.6...v3.0.7) (2021-04-01)

### [3.0.6](https://github.com/wagoid/commitlint-github-action/compare/v3.0.5...v3.0.6) (2021-03-02)


### Bug Fixes

* perform an atomic push when releasing ([9d00d1e](https://github.com/wagoid/commitlint-github-action/commit/9d00d1e75718143215dbf95c9c12956c56225e90))

### [3.0.5](https://github.com/wagoid/commitlint-github-action/compare/v3.0.3...v3.0.5) (2021-03-02)

### [3.0.4](https://github.com/wagoid/commitlint-github-action/compare/v3.0.3...v3.0.4) (2021-03-02)

### [3.0.3](https://github.com/wagoid/commitlint-github-action/compare/v3.0.2...v3.0.3) (2021-03-02)

### [3.0.2](https://github.com/wagoid/commitlint-github-action/compare/v3.0.1...v3.0.2) (2021-03-02)

### [3.0.1](https://github.com/wagoid/commitlint-github-action/compare/v3.0.0...v3.0.1) (2021-02-25)

## [3.0.0](https://github.com/wagoid/commitlint-github-action/compare/v2.2.5...v3.0.0) (2021-02-24)


### ⚠ BREAKING CHANGES

* **deps:** Remove support for lerna v2 and change the order of the `extends` resolution
from right-to-left to left-to-right.

### Bug Fixes

* **deps:** udpate commitlint monorepo to v12 ([8b0b095](https://github.com/wagoid/commitlint-github-action/commit/8b0b095f5e2c4a8bc5ebc94da6e1a9c0ebc6b862)), closes [#97](https://github.com/wagoid/commitlint-github-action/issues/97)

### [2.2.5](https://github.com/wagoid/commitlint-github-action/compare/v2.2.4...v2.2.5) (2021-02-18)

### [2.2.4](https://github.com/wagoid/commitlint-github-action/compare/v2.2.3...v2.2.4) (2021-02-17)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ RUN apk --no-cache add git

COPY package*.json /

RUN npm ci --production
RUN npm ci --production --ignore-scripts

COPY . .

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Commitlint Github Action

Lints Pull Request commits with commitlint
Lints Pull Request commits with [commitlint](https://commitlint.js.org/).

## Usage

@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2
- uses: wagoid/commitlint-github-action@v3
```
Alternatively, you can run on other event types such as `on: [push]`. In that case the action will lint the push event's commit(s) instead of linting commits from a pull request. You can also combine `push` and `pull_request` together in the same workflow.
@@ -26,6 +26,8 @@ Alternatively, you can run on other event types such as `on: [push]`. In that ca

## Inputs

You can supply these inputs to the `wagoid/commitlint-github-action@v3` step.

### `configFile`

The path to your commitlint config file.
@@ -34,6 +36,8 @@ Default: `commitlint.config.js`

If the config file doesn't exist, [config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) settings will be loaded as a default fallback.

Details on the configuration file can be found on [the commitlint website](https://commitlint.js.org/#/reference-configuration).

### `firstParent`

When set to true, we follow only the first parent commit when seeing a merge commit.
@@ -138,7 +142,7 @@ jobs:
- run: npm install
# Run the commitlint action, considering its own dependencies and yours as well 🚀
# `github.workspace` is the path to your repository.
- uses: wagoid/commitlint-github-action@v2
- uses: wagoid/commitlint-github-action@v3
env:
NODE_PATH: ${{ github.workspace }}/node_modules
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ outputs:
description: The error and warning messages for each one of the analyzed commits
runs:
using: docker
image: docker://wagoid/commitlint-github-action:2.2.5
image: docker://wagoid/commitlint-github-action:3.1.4
branding:
icon: check-square
color: blue
4 changes: 4 additions & 0 deletions fixtures/lerna-scopes/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "scoped",
"version": "0.1.0"
}
Loading