|
2 | 2 |
|
3 | 3 | Welcome to the MetaConfigurator project! We appreciate your interest in contributing. |
4 | 4 |
|
5 | | -Here are some guidelines for development: |
| 5 | +--- |
6 | 6 |
|
7 | | -## Code Style and Guidelines |
| 7 | +## Team Members (with repository access) |
8 | 8 |
|
9 | | -- Follow the coding conventions and style guidelines that are defined in prettier and eslint config file. |
10 | | - They are automatically checked and partially applied on each pull request. |
11 | | -- Write clear and concise code with appropriate comments when necessary. |
12 | | -- Ensure that your code is properly formatted and free from any syntax errors. |
13 | | -- When creating a pull request, make sure to describe the changes you made and why you made them. |
14 | | -- Also include a description of how to test your changes. |
| 9 | +If you are part of the core team and have direct write access to the repository, follow this workflow: |
| 10 | + |
| 11 | +### 1. Start with a GitHub Issue |
| 12 | + |
| 13 | +Before writing any code, make sure there is a GitHub issue for the work you want to do. |
| 14 | +If no issue exists yet, create one. If one exists, assign yourself to it or ask a maintainer to assign you. |
| 15 | + |
| 16 | +### 2. Create a Branch from the Issue |
| 17 | + |
| 18 | +Create a branch directly from the GitHub issue (using the "Create a branch" link on the issue page). |
| 19 | +This automatically links the branch to the issue. |
| 20 | +Branch names follow the pattern `<issue-number>-short-description`, e.g. `123-add-searchbar`. |
| 21 | + |
| 22 | +### 3. Develop Locally |
| 23 | + |
| 24 | +Check out the branch locally: |
| 25 | + |
| 26 | +```sh |
| 27 | +git fetch origin |
| 28 | +git checkout <branch-name> |
| 29 | +``` |
| 30 | + |
| 31 | +See [documentation_developer/README.md](documentation_developer/README.md) for setup instructions. |
| 32 | + |
| 33 | +### 4. Open a Pull Request |
| 34 | + |
| 35 | +When the work is complete, open a Pull Request and request a review. |
| 36 | +You can optionally open a **Draft Pull Request** earlier during development — this lets others follow along and give early feedback without a formal review being requested. |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## External Contributors (without repository access) |
| 41 | + |
| 42 | +If you are not part of the core team, you will need to fork the repository. |
| 43 | + |
| 44 | +### 1. Find or Create an Issue |
| 45 | + |
| 46 | +Check the existing issues before starting. If none covers your idea, open one. |
| 47 | +**Leave a comment or contact the maintainers** to express interest — this avoids duplicate work and ensures your contribution is likely to be accepted. |
| 48 | + |
| 49 | +### 2. Fork and Clone |
| 50 | + |
| 51 | +Fork the repository on GitHub, then clone your fork: |
| 52 | + |
| 53 | +```sh |
| 54 | +git clone https://github.com/<your-username>/meta-configurator.git |
| 55 | +cd meta-configurator |
| 56 | +``` |
| 57 | + |
| 58 | +Add the upstream remote so you can stay up to date: |
| 59 | + |
| 60 | +```sh |
| 61 | +git remote add upstream https://github.com/MetaConfigurator/meta-configurator.git |
| 62 | +``` |
| 63 | + |
| 64 | +### 3. Create a Feature Branch |
| 65 | + |
| 66 | +Never work directly on `main`. Create a branch for your change: |
| 67 | + |
| 68 | +```sh |
| 69 | +git checkout -b <issue-number>-short-description |
| 70 | +``` |
| 71 | + |
| 72 | +### 4. Open a Pull Request |
| 73 | + |
| 74 | +When your work is complete, open a Pull Request against the upstream `main` branch and request a review. |
| 75 | +You can optionally open a **Draft Pull Request** earlier during development to get early feedback from maintainers. |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## Commit Message Convention |
| 80 | + |
| 81 | +This project follows [Conventional Commits](https://www.conventionalcommits.org/). Every commit message must start with a **type prefix**, followed by a short description written as a **verb phrase starting with a capital letter**. |
| 82 | + |
| 83 | +``` |
| 84 | +<type>: <Verb> <subject> |
| 85 | +``` |
| 86 | + |
| 87 | +**Examples:** |
| 88 | +``` |
| 89 | +feat: Add searchbar component |
| 90 | +fix: Resolve crash when schema is empty |
| 91 | +refactor: Extract validation logic into utility |
| 92 | +docs: Update contributing guide |
| 93 | +chore: Bump version to 2.1.0 |
| 94 | +``` |
| 95 | + |
| 96 | +**Type prefixes and their effect on versioning:** |
| 97 | + |
| 98 | +| Prefix | Description | Version bump | |
| 99 | +|---|---|---| |
| 100 | +| `feat:` | A new feature | Minor (`x.Y.0`) | |
| 101 | +| `fix:` | A bug fix | Patch (`x.y.Z`) | |
| 102 | +| `perf:` | A performance improvement | Patch | |
| 103 | +| `refactor:` | Code restructuring without behavior change | Patch | |
| 104 | +| `docs:` | Documentation only | Patch | |
| 105 | +| `chore:` | Build process, dependencies, tooling | Patch | |
| 106 | +| `test:` | Adding or fixing tests | Patch | |
| 107 | +| `BREAKING CHANGE:` | Incompatible API change | Major (`X.0.0`) | |
| 108 | + |
| 109 | +The CI/CD pipeline uses these prefixes to automatically determine the next [semantic version](https://semver.org/) when commits are merged to `main`. |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## Pull Request Guidelines |
| 114 | + |
| 115 | +- **Title:** Use the same convention as commit messages — `<type>: <Verb> <subject>`. |
| 116 | +- **Description:** Always explain **why** the change is needed, not just what was changed. Link the related issue. |
| 117 | +- **Scope:** Keep PRs focused on a single concern. Smaller PRs are reviewed faster and merged sooner. |
| 118 | +- **Discussion:** PRs are the primary place for code review discussion. Use inline comments and the general PR thread to ask questions and suggest improvements. |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## Code Style and Local Setup |
| 123 | + |
| 124 | +Follow the coding conventions defined in the Prettier and ESLint configuration files. |
| 125 | +For installation, running the dev server, linting, and testing, see the [developer documentation](documentation_developer/README.md). |
| 126 | + |
| 127 | +--- |
15 | 128 |
|
16 | 129 | ## Issue Reporting |
17 | 130 |
|
18 | | -If you encounter any issues or have suggestions for improvement, please open an issue in the project repository. |
19 | | -Provide a clear and descriptive title and include steps to reproduce the problem, if applicable. |
| 131 | +If you encounter a bug or have a feature suggestion, please open an issue. Provide a clear title and, for bugs, include steps to reproduce the problem. |
20 | 132 |
|
21 | | -Thank you for your contribution! |
| 133 | +Thank you for contributing! |
0 commit comments