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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# デフォルトのレビュワー(全てのファイルに対して)
* @bearl27

# バックエンドのレビュワー
/backend/ @kubodayo @yone-al

# フロントエンドのレビュワー
/frontend/ @KZ-a-k @IRyoma
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
back:
- changed-files:
- any-glob-to-any-file: 'backend/**/*'

front:
- changed-files:
- any-glob-to-any-file: 'frontend/**/*'

documentation:
- changed-files:
- any-glob-to-any-file: ['*.md', 'docs/**/*']

github-actions:
- changed-files:
- any-glob-to-any-file: '.github/**/*'
84 changes: 17 additions & 67 deletions .github/workflows/auto_label_and_review.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,29 @@
name: Auto Label and Assign Reviewer
name: Auto Label and Assign

on:
pull_request:
types: [opened, ready_for_review]
types: [opened, synchronize]

jobs:
label_and_assign:
auto_label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Auto Label and Assign Reviewer
uses: actions/github-script@v7
- name: Auto Label
uses: actions/labeler@v6.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const branchName = context.payload.pull_request.head.ref;
const prNumber = context.payload.pull_request.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
repo-token: ${{ secrets.GITHUB_TOKEN }}

let labelsToAdd = [];
let reviewersToAdd = [];

// Configuration
const backendReviewers = ['kubodayo', 'yone-al', 'bearl27'];
const frontendReviewers = ['KZ-a-k', 'IRyoma', 'bearl27'];
const otherReviewers = ['kc3hack/2026_10'];

if (branchName.startsWith('BE-')) {
labelsToAdd.push('back');
reviewersToAdd = backendReviewers;
} else if (branchName.startsWith('FE-')) {
labelsToAdd.push('front');
reviewersToAdd = frontendReviewers;
} else {
labelsToAdd.push('other');
reviewersToAdd = otherReviewers;
}

if (labelsToAdd.length > 0) {
await github.rest.issues.addLabels({
owner,
repo,
issue_number: prNumber,
labels: labelsToAdd
});
console.log(`Added labels: ${labelsToAdd.join(', ')}`);
}

if (reviewersToAdd.length > 0) {
try {
await github.rest.pulls.requestReviewers({
owner,
repo,
pull_number: prNumber,
reviewers: reviewersToAdd
});
console.log(`Requested reviewers: ${reviewersToAdd.join(', ')}`);
} catch (error) {
console.error('Error requesting reviewers:', error);
}
}

// Auto-assign PR creator as assignee
const prCreator = context.payload.pull_request.user.login;
try {
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: prNumber,
assignees: [prCreator]
});
console.log(`Assigned PR creator: ${prCreator}`);
} catch (error) {
console.error('Error assigning PR creator:', error);
}
auto_assign:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Auto Assign Author
uses: toshimaru/auto-author-assign@v3.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
77 changes: 5 additions & 72 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,6 @@
# React + TypeScript + Vite
# Frontend
立ち上げ方

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
```bash
npm run dev
```