diff --git a/.github/workflows/pr-title-linter.yaml b/.github/workflows/pr-title-linter.yaml index b97b92e..2f5cc29 100644 --- a/.github/workflows/pr-title-linter.yaml +++ b/.github/workflows/pr-title-linter.yaml @@ -15,6 +15,6 @@ jobs: - uses: actions/checkout@v3 - name: Semantic Release PR Title Check - uses: osl-incubator/semantic-release-pr-title-check@v1.3.0 + uses: osl-incubator/semantic-release-pr-title-check@v1.3.1 with: convention-name: conventionalcommits diff --git a/README.md b/README.md index 72c0954..f08dbe0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - name: Semantic Release PR Title Check - uses: osl-incubator/semantic-release-pr-title-check@v1.3.0 + uses: osl-incubator/semantic-release-pr-title-check@v1.3.1 with: #Optional convention-name: conventionalcommits #Default: angular ``` diff --git a/dist/linter.js b/dist/linter.js index d07840b..60f1aca 100644 --- a/dist/linter.js +++ b/dist/linter.js @@ -25,18 +25,18 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); exports.linter = void 0; const core = __importStar(require("@actions/core")); -const allowedTags = [ - "build", - "ci", - "chore", - "docs", - "feat", - "fix", - "perf", - "refactor", - "test", -]; function linter(title) { + let allowedTags = [ + "build", + "ci", + "chore", + "docs", + "feat", + "fix", + "perf", + "refactor", + "test", + ]; let preset = core.getInput('convention-name'); try { let splitTitle = extractContext(title, preset); @@ -60,7 +60,7 @@ function extractContext(title, preset) { let matches = title.matchAll(regEx); try { let results = Array.from(matches)[0].filter(Boolean).splice(1); - if (results.length === 4 && preset !== 'conventionalcommits') { + if (results.length === 4 && preset !== `conventionalcommits`) { throw ("- To use '!' in the title, set preset as `convenvionalcommits`"); } ; diff --git a/package-lock.json b/package-lock.json index 1a391ce..539e828 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "semantic-release-pr-title-check", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "semantic-release-pr-title-check", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", diff --git a/package.json b/package.json index c281e38..68ab0b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-release-pr-title-check", - "version": "1.3.0", + "version": "1.3.1", "description": "Checks for [Angular commit message format](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format) in the Pull Request Title.", "main": "build/main.js", "directories": { diff --git a/src/linter.ts b/src/linter.ts index ba03cfe..a0f5109 100644 --- a/src/linter.ts +++ b/src/linter.ts @@ -1,20 +1,20 @@ import * as core from "@actions/core"; -const allowedTags = [ - "build", - "ci", - "chore", - "docs", - "feat", - "fix", - "perf", - "refactor", - "test", -]; - export function linter(title: string) { + let allowedTags = [ + "build", + "ci", + "chore", + "docs", + "feat", + "fix", + "perf", + "refactor", + "test", + ]; + let preset: string = core.getInput('convention-name'); try { @@ -43,7 +43,7 @@ function extractContext(title: string, preset: string): string[] { try { let results = Array.from(matches)[0].filter(Boolean).splice(1); - if (results.length === 4 && preset !== 'conventionalcommits') { + if (results.length === 4 && preset !== `conventionalcommits`) { throw("- To use '!' in the title, set preset as `convenvionalcommits`"); };