Skip to content

Commit

Permalink
Merge pull request #1 from flagbit/develop
Browse files Browse the repository at this point in the history
fix: Set correct indentation in rules
  • Loading branch information
mralexandernickel authored Mar 10, 2021
2 parents f4a073d + 1e8cd08 commit bbb3c5e
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 36 deletions.
1 change: 0 additions & 1 deletion .github/workflows
Submodule workflows deleted from 0fd09e
15 changes: 15 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: commitlint
on: pull_request

jobs:
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
yarn global add @commitlint/cli @commitlint/config-conventional
echo "$(yarn global bin)" >> $GITHUB_PATH
- run: make lint
26 changes: 26 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release-please
on:
push:
branches:
- master
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: "https://registry.npmjs.org"
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ GITHUB_BASE_REF ?= master

.PHONY: lint
lint:
commitlint -g index.js --from=$$(git rev-parse remotes/origin/$(GITHUB_BASE_REF))
commitlint -g commitlint.config.js --from=$$(git rev-parse remotes/origin/$(GITHUB_BASE_REF))
8 changes: 8 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: ["./index.js"],
parserPreset: {
parserOpts: {
issuePrefixes: ["FBTLOPS-"],
},
},
};
68 changes: 34 additions & 34 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-case': [2, 'always', 'sentence-case'],
'body-leading-blank': [2, 'always'],
'body-max-line-length': [2, 'always', 72],
'footer-leading-blank': [2, 'always'],
'footer-max-line-length': [2, 'always', 72],
'header-max-length': [2, 'always', 72],
'header-min-length': [2, 'always', 30],
'references-empty': [2, 'never'],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'always', 'sentence-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',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
extends: ["@commitlint/config-conventional"],
rules: {
"body-case": [2, "always", "sentence-case"],
"body-leading-blank": [2, "always"],
"body-max-line-length": [2, "always", 72],
"footer-leading-blank": [2, "always"],
"footer-max-line-length": [2, "always", 72],
"header-max-length": [2, "always", 72],
"header-min-length": [2, "always", 30],
"references-empty": [2, "never"],
"scope-case": [2, "always", "lower-case"],
"subject-case": [2, "always", "sentence-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",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
],
],
},
};

0 comments on commit bbb3c5e

Please sign in to comment.