Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"footer-max-line-length": [0, "always"],
"header-max-length": [2, "always", 72],
"references-empty": [1, "never"],
"subject-case": [0],
"scope-enum": [2, "always", ["mbe", "ebe", "docker"]],
"scope-empty": [0, "never"]
},
"parserPreset": {
"parserOpts": {
"issuePrefixes": ["BTC-", "COIN-", "WP-"]
}
}
}
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,38 @@ on:
default: '22.1.0'

jobs:
commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Cache dependencies
uses: actions/cache@v3
id: node-modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Validate PR commits with commitlint
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

build:
name: Build
runs-on: ubuntu-latest
Expand All @@ -22,7 +54,17 @@ jobs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Cache dependencies
uses: actions/cache@v3
id: node-modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Build
Expand All @@ -41,7 +83,17 @@ jobs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Cache dependencies
uses: actions/cache@v3
id: node-modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Lint
Expand All @@ -60,7 +112,17 @@ jobs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Cache dependencies
uses: actions/cache@v3
id: node-modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Generate test SSL certificates
Expand Down
34 changes: 34 additions & 0 deletions git_commit_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# ^ Subject Line
# Capitalize, do not end with a period, use the imperative mood
# Limit the subject line to no more than 72 characters: end here --> |


# ^ Body
# Separate subject from body with a blank line, wrap at 72 characters|
# Use the body to explain what and why

Ticket: PROJECT-NUMBER
# ^ Metadata: keyword: <value>

########################################################################
# #
# BitGo Commit Message Standard #
# (info inlined above as well) #
# #
# #
########################################################################
# Commit Message SHALL
# …limit the subject line to no more than 72 characters
# …capitalize the subject line
# …not end the subject line with a period
# …use the imperative mood in the subject line
# …separate subject from body with a blank line
# …wrap the body at 72 characters
#
# Commit Message SHOULD use the body to explain what and why vs. how
#
# Commit Message metadata SHALL be at the bottom of the commit message
# Commit Message metadata MUST follow format “keyword: <value>”
# Commit Message metadata SHOULD contain a ticket reference in the format “Ticket: PROJECT-NUMBER”
#
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@
"@api-ts/response": "^2.1.0",
"@api-ts/superagent-wrapper": "^1.3.3",
"@api-ts/typed-express-router": "^1.1.13",
"@bitgo/sdk-core": "^35.3.0",
"@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.291",
"@bitgo/abstract-utxo": "^9.21.4",
"@bitgo/sdk-coin-ada": "^4.11.5",
"@bitgo/sdk-coin-dot": "^4.3.5",
"@bitgo/sdk-coin-sui": "^5.15.5",
"@bitgo/sdk-coin-near": "^2.7.0",
"@bitgo/sdk-coin-sol": "^4.12.5",
"bitgo": "^48.1.0",
"@bitgo/abstract-utxo": "^9.21.4",
"@bitgo/sdk-coin-sui": "^5.15.5",
"@bitgo/sdk-core": "^35.3.0",
"@bitgo/statics": "^54.6.0",
"@commitlint/config-conventional": "^19.8.1",
"bitgo": "^48.1.0",
"body-parser": "^1.20.3",
"connect-timeout": "^1.9.0",
"debug": "^3.1.0",
Expand All @@ -54,6 +55,7 @@
},
"devDependencies": {
"@api-ts/openapi-generator": "^5.7.0",
"@commitlint/cli": "^19.8.1",
"@types/body-parser": "^1.17.0",
"@types/connect-timeout": "^1.9.0",
"@types/debug": "^4.1.12",
Expand Down
Loading