Skip to content

Commit

Permalink
feat(CI): CHANGELOG.mdの追記個所をチェックするCIを追加 (#12963)
Browse files Browse the repository at this point in the history
* feat(CI): CHANGELOG.mdの追記個所をチェックするCIを追加

* fix

* remove strategy

* fix

* fix
  • Loading branch information
samunohito authored Jan 13, 2024
1 parent bc8a741 commit 57017f2
Show file tree
Hide file tree
Showing 11 changed files with 3,481 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check the description in CHANGELOG.md

on:
pull_request:
branches:
- master
- develop

jobs:
check-changelog:
runs-on: ubuntu-latest

steps:
- name: Checkout head
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: '.node-version'

- name: Checkout base
run: |
mkdir _base
cp -r .git _base/.git
cd _base
git fetch --depth 1 origin ${{ github.base_ref }}
git checkout origin/${{ github.base_ref }} CHANGELOG.md
- name: Copy to Checker directory for CHANGELOG-base.md
run: cp _base/CHANGELOG.md scripts/changelog-checker/CHANGELOG-base.md
- name: Copy to Checker directory for CHANGELOG-head.md
run: cp CHANGELOG.md scripts/changelog-checker/CHANGELOG-head.md
- name: diff
continue-on-error: true
run: diff -u CHANGELOG-base.md CHANGELOG-head.md
working-directory: scripts/changelog-checker

- name: Setup Checker
run: npm install
working-directory: scripts/changelog-checker
- name: Run Checker
run: npm run run
working-directory: scripts/changelog-checker
9 changes: 9 additions & 0 deletions scripts/changelog-checker/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'../../packages/shared/.eslintrc.js',
],
};
3 changes: 3 additions & 0 deletions scripts/changelog-checker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
.idea
Loading

0 comments on commit 57017f2

Please sign in to comment.