Skip to content

Commit e0a1f0e

Browse files
authored
feat: 909 introduce semantic versioning (#910)
* feat: Introduce semantic versioning * remove outdated packages
1 parent fa2b669 commit e0a1f0e

12 files changed

Lines changed: 264 additions & 678 deletions

File tree

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Title must follow Conventional Commits: <type>: <Verb> <subject> — e.g. "feat: Add searchbar component" -->
2+
<!-- Types: feat | fix | perf | refactor | docs | chore | test — see CONTRIBUTING.md -->
3+
4+
**What was done:**
5+
6+
**Why:**
7+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Title Check
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
validate-title:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v5
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
types: |
23+
feat
24+
fix
25+
perf
26+
refactor
27+
docs
28+
chore
29+
test
30+
requireScope: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Semantic Versioning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
bump-version:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Determine next version (dry run)
21+
id: tag
22+
uses: mathieudutour/[email protected]
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
dry_run: true
26+
default_bump: patch
27+
# Conventional Commits mapping:
28+
# fix: -> patch, feat: -> minor, BREAKING CHANGE -> major
29+
major_string_token: 'BREAKING CHANGE,!:'
30+
minor_string_token: 'feat:'
31+
patch_string_token: 'fix:,perf:,refactor:'
32+
33+
- name: Update package.json version
34+
if: steps.tag.outputs.new_tag != steps.tag.outputs.previous_tag
35+
run: |
36+
cd meta_configurator
37+
npm version ${{ steps.tag.outputs.new_version }} --no-git-tag-version
38+
39+
- name: Commit version bump and create tag
40+
if: steps.tag.outputs.new_tag != steps.tag.outputs.previous_tag
41+
run: |
42+
git config user.name "github-actions[bot]"
43+
git config user.email "github-actions[bot]@users.noreply.github.com"
44+
git add meta_configurator/package.json
45+
git commit -m "chore: bump version to ${{ steps.tag.outputs.new_version }} [skip ci]"
46+
git tag ${{ steps.tag.outputs.new_tag }}
47+
git push
48+
git push --tags

CONTRIBUTING.md

Lines changed: 123 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,132 @@
22

33
Welcome to the MetaConfigurator project! We appreciate your interest in contributing.
44

5-
Here are some guidelines for development:
5+
---
66

7-
## Code Style and Guidelines
7+
## Team Members (with repository access)
88

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+
---
15128

16129
## Issue Reporting
17130

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.
20132

21-
Thank you for your contribution!
133+
Thank you for contributing!

documentation_developer/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Development
22

3+
> **New here?** See [CONTRIBUTING.md](../CONTRIBUTING.md) for the contribution workflow, branch naming, commit message conventions, and PR guidelines before diving in.
4+
35
The project relies on [Node Js](https://nodejs.org/en/download/).
46

57
We use [vue.js](https://vuejs.org/) as a frontend framework and [PrimeVue](https://www.primefaces.org/primevue/) for the UI components.

meta_configurator/env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/// <reference types="vite/client" />
2+
3+
declare const __APP_VERSION__: string;

meta_configurator/package-lock.json

Lines changed: 40 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meta_configurator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "config-assistant",
3-
"version": "0.0.0",
2+
"name": "meta-configurator",
3+
"version": "2.1.0",
44
"private": true,
55
"scripts": {
66
"dev": "vite",

meta_configurator/src/components/toolbar/dialogs/AboutDialog.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ defineProps<{visible: boolean}>();
1111
defineEmits<{
1212
(e: 'update:visible', newValue: boolean): void;
1313
}>();
14+
15+
const appVersion = __APP_VERSION__;
1416
</script>
1517

1618
<template>
@@ -24,6 +26,7 @@ defineEmits<{
2426
</p>
2527
<p>It is currently in alpha stage, so expect bugs and missing features.</p>
2628
<p>MetaConfigurator is open source and licensed under the MIT license.</p>
29+
<p class="text-sm text-gray-500">Version {{ appVersion }}</p>
2730
<p>
2831
Check our
2932
<a

0 commit comments

Comments
 (0)