From e5074ebc93b755099355b3adc5af84eea74d4980 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Wed, 30 Oct 2024 14:56:19 +0900 Subject: [PATCH 1/4] chore: recover commit lint and issue templates --- .github/templates/bug_report.md | 27 +++++++++++++++++++++ .github/templates/feature_request.md | 18 ++++++++++++++ .github/workflows/commit_lint.yml | 35 ++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .github/templates/bug_report.md create mode 100644 .github/templates/feature_request.md create mode 100644 .github/workflows/commit_lint.yml diff --git a/.github/templates/bug_report.md b/.github/templates/bug_report.md new file mode 100644 index 0000000..038e8cc --- /dev/null +++ b/.github/templates/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/templates/feature_request.md b/.github/templates/feature_request.md new file mode 100644 index 0000000..acac64d --- /dev/null +++ b/.github/templates/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: "" +assignees: "" +--- + +**Describe the feature you'd like** +A clear and concise description of what you want to happen. + +**Due date** +Until when should this issue be solved + +\*_Refernce_ + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/commit_lint.yml b/.github/workflows/commit_lint.yml new file mode 100644 index 0000000..b952f53 --- /dev/null +++ b/.github/workflows/commit_lint.yml @@ -0,0 +1,35 @@ +name: Commit message lint + +on: [push, pull_request] + +jobs: + commitlint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install required dependencies + run: | + sudo apt update + sudo apt install -y git curl + curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - + sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs + - name: Print versions + run: | + git --version + node --version + npm --version + npx commitlint --version + - name: Install commitlint + run: | + npm install conventional-changelog-conventionalcommits + npm install commitlint@latest + + - name: Validate current commit (last commit) with commitlint + if: github.event_name == 'push' + run: npx commitlint --last --verbose + + - name: Validate PR commits with commitlint + if: github.event_name == 'pull_request' + run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose From b275a36a883300b358e23270ca5d55dd42178153 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Wed, 30 Oct 2024 14:59:37 +0900 Subject: [PATCH 2/4] chore: recover pull request template --- .github/pull_request_template.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..517e38b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +## Describe your changes + +## Issue ticket number and link + +## Checklist before requesting a review + +- [ ] I have performed a self-review of my code +- [ ] If it is a core feature, I have added thorough tests. + +## Screenshots (if appropriate): From b232b19ff4cd2aac29bbaf97caaaf1bf9b5610d9 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Thu, 31 Oct 2024 11:25:10 +0900 Subject: [PATCH 3/4] chore: add commitlint file --- commitlint.config.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 commitlint.config.js diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..3f5e287 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +export default { extends: ['@commitlint/config-conventional'] }; From 41a348e1aec40c5277daa48cd73d5b21af04dda1 Mon Sep 17 00:00:00 2001 From: jjoonleo Date: Thu, 31 Oct 2024 11:32:28 +0900 Subject: [PATCH 4/4] chore: change commit lint tool --- .github/workflows/commit_lint.yml | 32 ++++--------------------------- commitlint.config.js | 1 - 2 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 commitlint.config.js diff --git a/.github/workflows/commit_lint.yml b/.github/workflows/commit_lint.yml index b952f53..c365062 100644 --- a/.github/workflows/commit_lint.yml +++ b/.github/workflows/commit_lint.yml @@ -1,35 +1,11 @@ -name: Commit message lint - -on: [push, pull_request] +name: Commit messages lint +on: [pull_request, push] jobs: commitlint: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install required dependencies - run: | - sudo apt update - sudo apt install -y git curl - curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs - - name: Print versions - run: | - git --version - node --version - npm --version - npx commitlint --version - - name: Install commitlint - run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest - - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: npx commitlint --last --verbose - - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose + - uses: wagoid/commitlint-github-action@v6 diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index 3f5e287..0000000 --- a/commitlint.config.js +++ /dev/null @@ -1 +0,0 @@ -export default { extends: ['@commitlint/config-conventional'] };