diff --git a/.github/workflows/commitlint.config b/.github/workflows/commitlint.config new file mode 100644 index 00000000..c578b207 --- /dev/null +++ b/.github/workflows/commitlint.config @@ -0,0 +1,89 @@ +{ + "rules":{ + "body-leading-blank":[ + 1, + "always" + ], + "body-max-line-length":[ + 2, + "always", + 120 + ], + "footer-leading-blank":[ + 1, + "always" + ], + "footer-max-line-length":[ + 2, + "always", + 120 + ], + "header-max-length":[ + 2, + "always", + 120 + ], + "references-empty":[ + 1, + "never" + ], + "scope-case":[ + 2, + "always", + "lower-case" + ], + "subject-empty":[ + 2, + "never" + ], + "subject-full-stop":[ + 2, + "never", + "." + ], + "type-case":[ + 2, + "always", + "lower-case" + ], + "type-empty":[ + 2, + "never" + ], + "type-enum":[ + 2, + "always", + [ + "build", + "ci", + "chore", + "docs", + "feat", + "fix", + "perf", + "infra", + "refactor", + "revert", + "style", + "test" + ] + ] + }, + "parserPreset":{ + "parserOpts":{ + "referenceActions":null, + "issuePrefixesCaseSensitive":true, + "issuePrefixes":[ + "ADATA-", + "CONTENT-", + "OSINSPIRE-", + "MINT-", + "OSACCNT-", + "PWAC-", + "SAB-", + "WTF-", + "XCCWS-" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index c69d15d7..bb83b0cd 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -16,6 +16,4 @@ jobs: node-version: 12 - uses: ./ env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - config: some config \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/some-change b/some-change new file mode 100644 index 00000000..d9bf763d --- /dev/null +++ b/some-change @@ -0,0 +1 @@ +some-change diff --git a/src/index.js b/src/index.js index c10b947a..53dc134e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ +const fs = require('fs'); const core = require('@actions/core'); const github = require('@actions/github'); const validatePrTitle = require('./validatePrTitle'); @@ -6,9 +7,12 @@ module.exports = async function run() { try { const client = new github.GitHub(process.env.GITHUB_TOKEN); - const config = process.env.INPUT_CONFIG; + // const config = process.env.INPUT_CONFIG; - core.info(`config ${config}`); + // core.info(`config ${config}`); + + // const commitlint = fs.readFileSync('./commitlint.config'); + core.info(`info: ${JSON.stringify(fs.readdirSync('.'))}`); const contextPullRequest = github.context.payload.pull_request; if (!contextPullRequest) {