diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 856d2f71..f9cd3e55 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,16 +2,43 @@ Close # ## Self Check -- [ ] I've confirmed `All checks have passed` on PR page. (You may leave this box unchecked due to long workflows.) +- [ ] I've confirmed `All checks have passed` on this page. (このページで `All checks have passed` が表示されていることを確認した。) + - You may leave this box unchecked due to long workflows. - PR title follows [Angular's commit message format](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format). - PR title doesn't have `WIP:`. - All tests are passed. - Test command (e.g., `yarn test`) is passed. - Lint command (e.g., `yarn lint`) is passed. -- [ ] I've reviewed my changes on PR's diff view. +- [ ] I've reviewed my changes on GitHub PR's diff view. (GitHub上で自分の変更内容を確認した。) +- [ ] I've written the steps to test. (テスト手順を記載した。) +- [ ] I've added screenshots. (UIを変更した場合、スクリーンショットを追加した。) + - You may leave this box unchecked if you didn't modify the UI. + +## Steps to Test + +1. Open http://localhost-exercode.willbooster.net:3000/ja-JP/courses/_example/lessons/_example_a_plus_b/problems/_example_a_plus_b after login. +2. Select the language `C`. +3. Write the following code: + + ```c + #include + + int main(void) { + int a, b; + + scanf("%d %d", &a, &b); + printf("%d", a + b); + return 0; + } + ``` + +4. Push `Submit` button. +5. ... + + diff --git a/.husky/post-merge b/.husky/post-merge index 6f9c95b9..3d5899f5 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -6,4 +6,7 @@ run_if_changed() { fi } +run_if_changed "\..+-version" "awk '{print \$1}' .tool-versions | xargs -I{} asdf plugin add {}" +run_if_changed "\..+-version" "asdf plugin update --all" +run_if_changed "\..+-version" "asdf install" run_if_changed "package\.json" "yarn" diff --git a/.lintstagedrc.cjs b/.lintstagedrc.cjs index ec8bd4f1..e9aca4d8 100644 --- a/.lintstagedrc.cjs +++ b/.lintstagedrc.cjs @@ -10,4 +10,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, }; diff --git a/packages/shared-lib-blitz-next/.lintstagedrc.cjs b/packages/shared-lib-blitz-next/.lintstagedrc.cjs index d31f9e94..fd017d7f 100644 --- a/packages/shared-lib-blitz-next/.lintstagedrc.cjs +++ b/packages/shared-lib-blitz-next/.lintstagedrc.cjs @@ -19,4 +19,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, }; diff --git a/packages/shared-lib-node/.lintstagedrc.cjs b/packages/shared-lib-node/.lintstagedrc.cjs index d31f9e94..fd017d7f 100644 --- a/packages/shared-lib-node/.lintstagedrc.cjs +++ b/packages/shared-lib-node/.lintstagedrc.cjs @@ -19,4 +19,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, }; diff --git a/packages/shared-lib-react/.lintstagedrc.cjs b/packages/shared-lib-react/.lintstagedrc.cjs index 99ea336b..1105b5a5 100644 --- a/packages/shared-lib-react/.lintstagedrc.cjs +++ b/packages/shared-lib-react/.lintstagedrc.cjs @@ -19,4 +19,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, }; diff --git a/packages/shared-lib/.lintstagedrc.cjs b/packages/shared-lib/.lintstagedrc.cjs index d31f9e94..fd017d7f 100644 --- a/packages/shared-lib/.lintstagedrc.cjs +++ b/packages/shared-lib/.lintstagedrc.cjs @@ -19,4 +19,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, }; diff --git a/packages/wb/.lintstagedrc.cjs b/packages/wb/.lintstagedrc.cjs index d31f9e94..fd017d7f 100644 --- a/packages/wb/.lintstagedrc.cjs +++ b/packages/wb/.lintstagedrc.cjs @@ -19,4 +19,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, };