diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2e6ee1150..6be5f7e40 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,10 +13,10 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: '16' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 59e970548..9dfbe53ea 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -18,16 +18,13 @@ jobs: matrix: node-version: ['16', '17'] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --immutable --immutable-cache - - name: Check commit message - if: ${{ github.event_name == 'pull_request' }} - run: yarn commitlint ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - name: Linting & Unit testing run: | yarn lint @@ -42,9 +39,9 @@ jobs: gstreamer: image: steabert/gst-rtsp-launch steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: '16' - name: Install dependencies @@ -67,9 +64,9 @@ jobs: gstreamer: image: steabert/gst-rtsp-launch steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: '16' - name: Install dependencies @@ -90,9 +87,9 @@ jobs: gstreamer: image: steabert/gst-rtsp-launch steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: '14' - name: Install dependencies diff --git a/.gitignore b/.gitignore index 16bfb57f5..a0ce13bfe 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ node_modules/ # Python __pycache__/ + +# GitHub +!.github/ diff --git a/package.json b/package.json index 7ddd1b5bc..53ac22a59 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "rtsp": "sbin/rtsp-ws-server.sh", "examples": "yarn build && http-server examples/browser", "dev": "node sbin/dev.js", - "release": "sbin/release.py", - "commitlint": "sbin/commitlint.py" + "release": "sbin/release.py" }, "repository": { "type": "git", diff --git a/sbin/commitlint.py b/sbin/commitlint.py deleted file mode 100755 index 40e136b98..000000000 --- a/sbin/commitlint.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import sys -import subprocess - -import utils - - -parser = argparse.ArgumentParser( - description=""" -If no range is given, HEAD~..HEAD is used (so only the latest commit -will be checked). - -Note that the a range fa56eb..HEAD does not include the fa56eb commit -(to start from e.g. fa56eb, you would write fa56eb~..HEAD to use the parent -as starting point). - -Check if message conforms to a conventional commit message, see -https://www.conventionalcommits.org/en/v1.0.0/#specification -""" -) -parser.add_argument( - "range", metavar="RANGE", type=str, nargs="?", default="HEAD~..HEAD" -) -args = parser.parse_args() - - -for sha in utils.cmd(["git", "rev-list", args.range]).split(): - message = utils.cmd(["git", "log", "-1", "--format=%s", sha]) - try: - data = utils.conventional_commit_parse(message) - print("ok:", message) - except: - print("ERROR:", message) - sys.exit(1)