-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating information for Contributors #3874
Changes from 15 commits
2be5137
79c2572
ade750a
9238e9f
3955d78
442bc48
53c27d8
452d95b
6c3b33d
ebbe0e2
74c3faf
d33faa8
62a4b4f
adc74ef
764625c
edecdc4
125f55a
6bcdfbc
9854d70
4d4114f
0b2aa76
93ed752
d3ea400
c73929b
2a5f610
f1e62d7
aec118c
4a816c5
89f7807
6f80fec
772ed94
2e9d8ae
41169e0
5b6e86b
3e325e3
7281338
05c9db4
6b5a6a6
e13d96c
a77d4b4
112fb04
f5710c1
a3c5d6b
7b2759e
b6b52e3
b2084b1
9297984
f46fb47
1ce1996
3a5df0a
92206a3
e2f8019
ad5c0ef
a7bb4e7
5645d1a
45af237
7522d9c
4eda3aa
f9792ca
09059e0
fe82f44
9b9bb97
445edde
433b3bb
ac30d1f
7113c39
36b517b
2765229
eddd021
80c5b51
2916332
5f8d379
b0fb00b
8644513
f1e66bc
d7104ae
05e8e55
49c11fb
d93c7b5
366752a
728c986
8d3076e
717d709
57555f9
23b552f
35e41ed
b16c227
c8f288d
bfd9736
bf9a9ed
6025543
99e3926
c963b97
d6006a1
6719a8f
244fcdb
ada98cd
072ae66
9efc42a
eb86d12
3d94fb5
7fda832
43221d1
d0a6c07
8800bc8
a6bc168
55886b9
5b71710
025142b
f812cfe
5cf6848
65fb4d1
1be70aa
c6e9dc8
9e09bde
e0a5390
7614a94
a5a3597
2a7b76f
459639f
a5b449a
bcf1e90
1c688d5
1fd9784
d4abcd8
2e2af9a
482a4d2
61f0468
9a55a37
8420251
6e9733c
609f676
f6bc29c
483905b
37d04bd
9721d9a
6caba4b
2e8096f
4f1365b
02b61da
2aa3ef0
5b5ccd1
539d3e7
ed62526
f699420
fcc39e2
f001917
f98c77f
42d8955
e883e61
1e95ec3
9f31038
028d578
790cc91
3b325b2
10b611f
c74b265
ac4ae43
695a78f
38e47f3
793a5dd
b12194f
113383f
678aa1a
b5f7350
219bb31
c368e87
c8e30ea
a61ce7a
69ac043
7928ca9
1632571
609188a
f63de87
43145fa
e74ab24
16f9b2f
ccbc3cf
ee8f501
14a63c9
a8a07b8
fffd550
51a146e
4585926
9cfbd5a
e5b84b4
50b8bd6
ef72028
edff942
7abeed7
7c36f74
4565746
e94d71c
7dd1c62
b703e95
78a004e
e43027d
f14c0c1
f4e3e8a
07e773f
4667554
8701edf
3613cdf
ed270ca
4b7014b
adf8f17
af065f8
3cd7227
dcf9c61
d27566a
dbc64b5
a14dee4
12c91bf
c7c7a40
90a11b8
ba761d9
98fa4c5
2010194
df8ff7d
13c2f31
826ff35
5cae435
6f60296
edc05ba
c092ecd
396636c
2af6161
5ff5f60
39f41c5
b9443a5
5ffa5e0
e5c7058
8aeb9bc
0420042
85ae1b3
7602bf8
abc15bb
17fdfa6
4ebf80f
391dc36
e3706e4
df97afa
7a6bd51
d8191f5
e6758e8
95f99f4
2211aeb
b91a04a
0383fbc
bbc0023
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,143 +1,177 @@ | ||||||
<h1><span lang="en">Contributing</span> / <span lang="de">Mitarbeit</span></h1> | ||||||
# Contributing :tada: | ||||||
Thank you for wanting to help out! :heart: | ||||||
|
||||||
<span lang="en">Thank you for wanting to help out!</span> <em lang="de">Danke dass du mithelfen möchtest!</em> | ||||||
Danke dass du mithelfen möchtest! | ||||||
Die deutsche Version dieses Dokuments findest du [hier](./CONTRIBUTING_DE.md). | ||||||
|
||||||
<em lang="de">Die <a href="#deutsch">deutsche Übersetzung</a> findest du weiter unten.</em> | ||||||
# English :milky_way: | ||||||
|
||||||
## English | ||||||
## [Code of conduct](https://www.ecamp3.ch/en/code-of-conduct) :page_with_curl: | ||||||
|
||||||
### [Code of conduct](https://www.ecamp3.ch/en/code-of-conduct) | ||||||
## Workflow :gear: | ||||||
This is a basic overview of the workflow, i.e. how we work with the code of eCamp v3. More information about how to set up a development environment on your computer is in the [wiki](https://github.com/ecamp/ecamp3/wiki/installation). | ||||||
If something about the setup is unclear, or you run into an error, there are [discussions](https://github.com/ecamp/ecamp3/discussions) on GitHub for you to ask questions and ask for help. :computer: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace this sentence with a Discord invite link: https://discord.gg/tdwtRytV6P |
||||||
### Labels :label: | ||||||
Issues are marked with labels and some of them are not self-explanatory and are explained here: | ||||||
- **Type-Labels**: | ||||||
Type labels follow the `type: *` format with the options `Frontend`, `Print`, `Deployment` & `API` the architecture for those are partially documented in the [wiki](https://github.com/ecamp/ecamp3/wiki/architecture-frontend) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than describing semi-formally how we construct these labels, how about just listing the examples |
||||||
- **Needs prototype**: :bulb: If you have an idea how to solve this issue: we'd like to see it. This issue needs a prototype before actual implementation begins since the specifications are somewhat vague. A prototype can be many things, whether your prototype is a sketch, mockup, partial implementation or something else is up to you. | ||||||
- **Good first issue**: :green_heart: Beginner friendly issues. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move this up to the first position in the list? |
||||||
- **Feature request**: :rocket: An idea/request for a functionality, not ready to be implemented but ready to be discussed. | ||||||
|
||||||
### Git setup | ||||||
### :point_right: Starting with an issue | ||||||
To get started, find an issue that interests you. If you are new, we recommend selecting a [Good first issue](https://github.com/ecamp/ecamp3/labels/Good%20first%20issue). | ||||||
Please note that for other issues we recommend ones with the label [Ready for Implementation](https://github.com/ecamp/ecamp3/issues?q=is%3Aopen+is%3Aissue+label%3A%22Ready+for+implementation%22), which signifies that the issue should have clear definitions. If you have any questions, feel free to ask. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the Ready for Implementation label deserve to be described above? Or is it self-explanatory enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's self-explanatory and somewhat normal. If you see an issue with "Ready for implementation" it is clear what this means. Unlike (for example) "Needs prototype" where that could mean multiple things. |
||||||
If you are working on an issue, please leave a comment so that we can assign it to you, to make sure that the specifications are still up-to-date, and to prevent two people working on the same issue. | ||||||
Alternatively, open a draft pull request and mention the issue ID to signal that you are working on that particular issue. | ||||||
Please note that while the wiki can be helpful in understanding the project, it's not exhaustive (meaning there might be parts missing or out of date). If you have any questions, please comment on the issue for clarification. We are happy to help and answer any questions you might have. | ||||||
|
||||||
### Git setup :octocat: | ||||||
|
||||||
We use a triangular git workflow. This means that all changes are first pushed to a contributor's fork of the repository, and then the changes are merged into the main fork via a pull request. In practice, setting up this workflow looks as follows: | ||||||
|
||||||
1. Fork the main repository onto your GitHub account. Let's say your GitHub account is called `your-username`. | ||||||
1. Fork the main repository onto your GitHub account. To use the commands your configured git `user.name` must be exactly your git user name. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Github just takes the user.name used in the commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is one of my bolder choices in this PR. Here is what I was thinking: the people who lack the technical knowledge to set up a git repo using a forked repo are the main concerns here. When this was the case for me I used Git over GUI Tools (Login to GitHub in Intellij, GitHub Desktop) and my Git username was always set to my GitHub username. I made the assumption that most people have In the happy flow, you can now execute every command as it is (for example using IntelliJ or copy-paste-execute) and there are no modifications needed. If you use a different git username the only thing that changed compared to the previous version is the text you are replacing. You still need to replace text in the exact same places. Instead of replacing There is no requirement to have your git username match your GitHub username, this is a requirement for the happy flow. This could probably be better written. This might be an impactful change but I am convinced it will make the setup more efficient overall. Do you want me to clarify in the documentation or revert my changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the idea of describing the happy flow for beginners, and leave experienced git gurus to do things their way. Maybe you could just change "must" (and "need to" in the paragraph below) to "should", and it'll sound less harsh while still being strongly suggestive? |
||||||
If you run the code below, and it outputs your GitHub username you are good to go. | ||||||
```shell | ||||||
echo $(git config user.name) | ||||||
``` | ||||||
If not you need to replace the `$(git config user.name)` parts with your username or run `git config --global user.name "YourUsername"` with your GitHub username instead of `YourUsername` | ||||||
|
||||||
|
||||||
2. Clone the main repository to your local computer: | ||||||
|
||||||
```bash | ||||||
```shell | ||||||
git clone https://github.com/ecamp/ecamp3.git | ||||||
cd ecamp3 | ||||||
``` | ||||||
|
||||||
3. Add your fork as a remote: | ||||||
|
||||||
```bash | ||||||
git remote add your-username https://github.com/your-username/ecamp3.git | ||||||
```shell | ||||||
git remote add "$(git config user.name)" "https://github.com/$(git config user.name)/ecamp3.git" | ||||||
``` | ||||||
|
||||||
4. Configure the central repo for pulling the current state and your own repo for pushing new changes: | ||||||
|
||||||
```bash | ||||||
git config remote.pushdefault your-username | ||||||
```shell | ||||||
git config remote.pushdefault "$(git config user.name)" | ||||||
git config push.default current | ||||||
``` | ||||||
|
||||||
Once this is set up, you can start coding, and all `git pull` commands should pull from the central repository by default, while all `git push` commands will push to your fork of the project. | ||||||
|
||||||
### Starting a new feature | ||||||
#### Checkout a feature branch | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion, this was more beginner-friendly language before. It signified that the instructions above are one-time setup steps, and for every feature after that, you can just start here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||||||
|
||||||
Before starting a new feature, you should do the following steps to start with a clean state that is easily mergeable later: | ||||||
|
||||||
```bash | ||||||
```shell | ||||||
git fetch --all | ||||||
git checkout origin/devel | ||||||
git checkout -b my-new-feature-branch | ||||||
``` | ||||||
|
||||||
### Code formatting | ||||||
|
||||||
We use cs-fixer for PHP and ESLint and Prettier for Javascript to ensure a common code style. Make sure your code is auto-formatted before comitting and pushing to the repository. | ||||||
### Before submitting pull requests :incoming_envelope: | ||||||
|
||||||
#### Code formatting :art: | ||||||
|
||||||
We use cs-fixer for PHP and ESLint and Prettier for Javascript to ensure a common code style. Make sure your code is auto-formatted before committing and pushing to the repository. | ||||||
We recommend to [configure your IDE](https://github.com/ecamp/ecamp3/wiki/installation-development-windows#code-auto-formatting) such that your code is auto-formatted on save. | ||||||
|
||||||
Alternatively you can | ||||||
|
||||||
- run php-cs-fixer and ESLint / Prettier manually before each commit: | ||||||
```bash | ||||||
docker compose run api composer cs-fix | ||||||
docker compose run frontend npm run lint | ||||||
docker compose run print npm run lint | ||||||
``` | ||||||
- set-up a git pre-commit hook to run php-cs-fixer and ESLint automatically before each commit | ||||||
|
||||||
### Before submitting pull requests | ||||||
|
||||||
- [x] Did cs-fixer run on all changed or new PHP files? | ||||||
- [x] Did ESLint / Prettier run on all changed or new JS / Vue files? | ||||||
- [x] Are all variables, classes, functions, comments etc. named or written in English? | ||||||
- [x] Did you write tests for any new functionality or adapt the existing tests for changed functionality? | ||||||
- [x] Are all passwords, credentials and local configuration removed from the code changes? | ||||||
- [x] Do all changed files contain some important changes (as opposed to e.g. only whitespace changes)? | ||||||
- [x] Is the fork up-to-date with the central repository and can your changes be merged automatically? | ||||||
- [x] Did the GitHub Actions CI build run through without test failures? | ||||||
|
||||||
## Deutsch | ||||||
|
||||||
### [Verhaltenskodex](https://www.ecamp3.ch/de/verhaltenskodex) | ||||||
|
||||||
### Git einrichten | ||||||
|
||||||
Wir wenden einen triangulären Git-Workflow an. Das bedeutet, dass alle Code-Änderungen zuerst auf dem Fork des Entwicklers veröffentlicht werden, und erst dann werden die Änderungen via Pull Request in das offizielle eCamp3-Repository eingefügt. Um dies einzurichten, befolgen wir folgende Schritte: | ||||||
|
||||||
1. Erstelle einen persönlichen Fork des zentralen Repositories auf GitHub. Nehmen wir an dein GitHub-Account heisst `your-username`. | ||||||
|
||||||
2. Klone das originale Repository auf deinen lokalen Computer: | ||||||
|
||||||
```bash | ||||||
git clone https://github.com/ecamp/ecamp3.git | ||||||
cd ecamp3 | ||||||
``` | ||||||
|
||||||
3. Füge deinen Fork als Remote hinzu: | ||||||
|
||||||
```bash | ||||||
git remote add your-username https://github.com/your-username/ecamp3.git | ||||||
``` | ||||||
|
||||||
4. Konfiguriere Git, sodass es als aktuellen, offiziellen Code-Stand das zentrale Repository und fürs Veröffentlichen neuer Änderungen den Fork verwendet: | ||||||
|
||||||
```bash | ||||||
git config remote.pushdefault your-username | ||||||
git config push.default current | ||||||
``` | ||||||
|
||||||
Wenn dies eingerichtet ist kannst du loslegen, und alle `git pull`-Befehle sollten standardmässig den Code vom zentralen Repository holen und `git push`-Befehle sollten auf deinen eigenen Fork des Projekts senden. | ||||||
|
||||||
### Ein neues Feature beginnen | ||||||
|
||||||
Bevor du etwas am Code änderst, solltest du jeweils die folgenden Schritte durchführen, um mit einem sauberen Stand zu starten der später einfach gemerged werden kann: | ||||||
|
||||||
```bash | ||||||
git fetch --all | ||||||
git checkout origin/devel | ||||||
git checkout -b my-new-feature-branch | ||||||
- <details> | ||||||
BacLuc marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
<summary>run php-cs-fixer and ESLint / Prettier manually before each commit: (Click me, I am Expandable) </summary> | ||||||
|
||||||
```shell | ||||||
# Frontend fixes in running container | ||||||
docker compose exec frontend npm run lint | ||||||
|
||||||
# API/PHP fixes in running container | ||||||
docker compose exec php composer cs-fix | ||||||
|
||||||
# Print fixes in running container | ||||||
docker compose exec print npm run lint | ||||||
|
||||||
# PDF fixes in running container | ||||||
docker compose exec pdf npm run lint | ||||||
|
||||||
# E2E fixes are always run like this | ||||||
docker compose run --rm --entrypoint="npm run lint" e2e | ||||||
``` | ||||||
If you don't have a container of that type running use 'run' instead of 'execute'. Note that this will start a new Docker container (which might not be desired on a device with limited computing resources). | ||||||
carlobeltrame marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
```shell | ||||||
docker compose run frontend npm run lint | ||||||
docker compose run php composer cs-fix | ||||||
docker compose run print npm run lint | ||||||
docker compose run pdf npm run lint | ||||||
``` | ||||||
DeNic0la marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
</details> | ||||||
- set up a pre-commit [Git-Hook](https://www.atlassian.com/git/tutorials/git-hooks) to run php-cs-fixer and ESLint automatically before each commit, you can find an example in the [pre-commit.sh](./pre-commit.sh) file. | ||||||
<details> | ||||||
<summary>To use this example as a Git-Hook run the following commands (Click me, I am expandable)</summary> | ||||||
<strong>Consider examining the file before running random code from a public Git repo.</strong> | ||||||
|
||||||
```shell | ||||||
# Ensure the file is executable | ||||||
chmod +x .git/hooks/pre-commit | ||||||
# Create a link, alternatively use 'cp' instead of 'ln' to copy | ||||||
ln ./pre-commit.sh .git/hooks/pre-commit | ||||||
# Lets see how long execution takes | ||||||
time .git/hooks/pre-commit | ||||||
``` | ||||||
|
||||||
### Quellcode Formatierung | ||||||
|
||||||
Wir verwenden php-cs-fixer für PHP und ESLint und Prettier für JS um einen gemeinsamen Code Style zu etablieren. Bitte stelle sicher, dass dein Code automatisch richtig formatiert wird, bevor du diesen ins Git repo committest. | ||||||
|
||||||
Wir empfehlen deine [IDE so zu konfigurieren](https://github.com/ecamp/ecamp3/wiki/installation-development-windows#code-auto-formatting), dass dein Code beim Speichern automatisch richtig formatiert wird. | ||||||
|
||||||
Alternativ kannst du | ||||||
|
||||||
- php-cs-fixer und ESLint / Prettier vor jedem commit manuell laufen lassen: | ||||||
```bash | ||||||
docker compose run api composer cs-fix | ||||||
docker compose run frontend npm run lint | ||||||
docker compose run print npm run lint | ||||||
``` | ||||||
- einen git pre-commit hook einrichten, der php-cs-fixer und ESLint vor jedem commit triggert | ||||||
|
||||||
### Vor dem Einreichen eines Pull Requests | ||||||
|
||||||
- [x] Wurden alle geänderten oder neuen PHP-Dateien von cs-fixer verarbeitet? | ||||||
- [x] Wurden alle geänderten oder neuen JS/Vue-Dateien von ESLint / Prettier bereinigt? | ||||||
- [x] Sind alle Variabeln, Klassen, Funktionen, Kommentare, etc. auf englisch benannt? | ||||||
- [x] Hast du für neue Funktionalität Tests geschrieben und für geänderte Funktionalität die Tests angepasst? | ||||||
- [x] Wurden alle Passwörter, Zugangsdaten und lokale Konfiguration aus den Code-Änderungen entfernt? | ||||||
- [x] Enthalten alle geänderten Dateien auch wirklich eine sinnvolle Änderung (im Gegensatz zu z.B. nur Whitespace-Änderungen)? | ||||||
- [x] Ist der Fork auf dem aktuellen Stand des zentralen Repositories und können die Änderungen automatisch gemerged werden? | ||||||
- [x] Ist der GitHub Actions CI-Build erfolgreich und ohne Test Failures durchgelaufen? | ||||||
</details> | ||||||
|
||||||
#### Checklist :pencil: | ||||||
|
||||||
We truly value and appreciate every contribution to our project! :heart: | ||||||
To make the collaboration smoother and more enjoyable for everyone, | ||||||
we've put together this checklist :scroll:. | ||||||
Following it will not only enhance the quality and consistency of your contributions:sparkles: but also fast-track the review process. :rocket: | ||||||
DeNic0la marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
|
||||||
- [x] **Sync with Central Repository:** :arrows_counterclockwise: Ensure your fork is current with the central repository, facilitating a smooth merge. | ||||||
DeNic0la marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- [x] **Lint:** :wrench: Ensure that linters have run over all new or modified files | ||||||
- [x] **Spelling:** :abc: Ensure that linters have run over all new or modified files | ||||||
DeNic0la marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- [x] **Significant Changes:** :mag_right: Confirm that every modified file contributes meaningful content, steering clear of inconsequential changes like mere whitespace adjustments. | ||||||
- [x] **Testing:** :test_tube: Write tests for any new features, and update existing ones if you've made changes to functionalities. | ||||||
- [x] **Language & Spelling:** :book: Use English for all variable names, class names, functions, comments, etc., and ensure that all added content has been spellchecked. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling is already mentioned above, remove either one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those two mean slightly different things. The first one is documentation (which I don't think needs to be English) and the other one is code, like variable names (which I do think needs to be (mostly) English). |
||||||
- [x] **Sensitive Information:** :no_entry: Before submitting, double-check to ensure no passwords, credentials, or local configurations are present in your changes. | ||||||
- [x] **Continuous Integration:** :green_circle: Confirm that the GitHub Actions CI build finishes successfully without test failures. | ||||||
|
||||||
## Database :floppy_disk: | ||||||
|
||||||
### Using Dev-Data for Local Development :construction_worker: | ||||||
For ease of development and to ensure consistency across local environments, | ||||||
we provide a predefined dataset known as 'Dev-Data'. | ||||||
This dataset is tailored to streamline the testing process and ensure that features, | ||||||
including edge cases, are effectively covered. | ||||||
|
||||||
### Recommended Test User :bust_in_silhouette: | ||||||
To begin with, utilize the `test@example.com / test` user credentials. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think "To begin with" means more like "Überhaupt mal" |
||||||
This user has been populated with a comprehensive set of camps that should suffice for testing most features and scenarios. | ||||||
|
||||||
### Feedback on Dev-Data :loudspeaker: | ||||||
We constantly strive to improve our 'Dev-Data'. | ||||||
If you identify gaps or believe there's an additional scenario it should cover, | ||||||
please open an issue to let us know. | ||||||
|
||||||
### Documentation :mag: | ||||||
For a deeper understanding of 'Dev-Data', you can refer to its dedicated [README](./api/migrations/dev-data/README.md). | ||||||
|
||||||
### Consistent Testing Across Environments :globe_with_meridians: | ||||||
'Dev-Data' is replicated across all development environments. | ||||||
We encourage its use for consistent testing. | ||||||
When reporting an issue or bug, consider referencing a specific example from 'Dev-Data'. | ||||||
Since the data, including IDs, remains consistent, it allows everyone to easily replicate and understand the behavior you're highlighting. | ||||||
|
||||||
## Discussions :speech_balloon: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace with Discord |
||||||
We understand that setting up a development environment can sometimes be tricky, | ||||||
especially with varying systems and configurations. | ||||||
If you encounter any issues or face roadblocks during the setup, | ||||||
please don't hesitate to open a Discussion on GitHub. | ||||||
Our core team is happy to help you. | ||||||
In fact, we encourage you to open a Discussion whenever you have a question. | ||||||
DeNic0la marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
Your feedback not only helps us refine the setup process for everyone but also ensures that potential issues are addressed promptly. | ||||||
Remember, our support isn't limited to just setup concerns; | ||||||
you're welcome to initiate discussions on any other topic you encounter. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Mitarbeit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the split into two different files. Can you also adjust the link in the German part of the README.md, and ideally also in the contribution guide on the landing page (https://github.com/ecamp/ecamp-site/blob/main/src/content/pages/contribution.de.md?plain=1#L28) |
||
Danke dass du mithelfen möchtest! | ||
|
||
# Deutsch WIP | ||
|
||
### [Verhaltenskodex](https://www.ecamp3.ch/de/verhaltenskodex) | ||
|
||
### Git einrichten | ||
|
||
Wir wenden einen triangulären Git-Workflow an. Das bedeutet, dass alle Code-Änderungen zuerst auf dem Fork des Entwicklers veröffentlicht werden, und erst dann werden die Änderungen via Pull Request in das offizielle eCamp3-Repository eingefügt. Um dies einzurichten, befolgen wir folgende Schritte: | ||
|
||
1. Erstelle einen persönlichen Fork des zentralen Repositories auf GitHub. Nehmen wir an dein GitHub-Account heisst `your-username`. | ||
|
||
2. Klone das originale Repository auf deinen lokalen Computer: | ||
|
||
```bash | ||
git clone https://github.com/ecamp/ecamp3.git | ||
cd ecamp3 | ||
``` | ||
|
||
3. Füge deinen Fork als Remote hinzu: | ||
|
||
```bash | ||
git remote add your-username https://github.com/your-username/ecamp3.git | ||
``` | ||
|
||
4. Konfiguriere Git, sodass es als aktuellen, offiziellen Code-Stand das zentrale Repository und fürs Veröffentlichen neuer Änderungen den Fork verwendet: | ||
|
||
```bash | ||
git config remote.pushdefault your-username | ||
git config push.default current | ||
``` | ||
|
||
Wenn dies eingerichtet ist kannst du loslegen, und alle `git pull`-Befehle sollten standardmässig den Code vom zentralen Repository holen und `git push`-Befehle sollten auf deinen eigenen Fork des Projekts senden. | ||
|
||
### Ein neues Feature beginnen | ||
|
||
Bevor du etwas am Code änderst, solltest du jeweils die folgenden Schritte durchführen, um mit einem sauberen Stand zu starten der später einfach gemerged werden kann: | ||
|
||
```bash | ||
git fetch --all | ||
git checkout origin/devel | ||
git checkout -b my-new-feature-branch | ||
``` | ||
|
||
### Quellcode Formatierung | ||
|
||
Wir verwenden php-cs-fixer für PHP und ESLint und Prettier für JS um einen gemeinsamen Code Style zu etablieren. Bitte stelle sicher, dass dein Code automatisch richtig formatiert wird, bevor du diesen ins Git repo committest. | ||
|
||
Wir empfehlen deine [IDE so zu konfigurieren](https://github.com/ecamp/ecamp3/wiki/installation-development-windows#code-auto-formatting), dass dein Code beim Speichern automatisch richtig formatiert wird. | ||
|
||
Alternativ kannst du | ||
|
||
- php-cs-fixer und ESLint / Prettier vor jedem commit manuell laufen lassen: | ||
```bash | ||
docker compose run api composer cs-fix | ||
docker compose run frontend npm run lint | ||
docker compose run print npm run lint | ||
``` | ||
- einen git pre-commit hook einrichten, der php-cs-fixer und ESLint vor jedem commit triggert | ||
|
||
### Vor dem Einreichen eines Pull Requests | ||
|
||
- [x] Wurden alle geänderten oder neuen PHP-Dateien von cs-fixer verarbeitet? | ||
- [x] Wurden alle geänderten oder neuen JS/Vue-Dateien von ESLint / Prettier bereinigt? | ||
- [x] Sind alle Variabeln, Klassen, Funktionen, Kommentare, etc. auf englisch benannt? | ||
- [x] Hast du für neue Funktionalität Tests geschrieben und für geänderte Funktionalität die Tests angepasst? | ||
- [x] Wurden alle Passwörter, Zugangsdaten und lokale Konfiguration aus den Code-Änderungen entfernt? | ||
- [x] Enthalten alle geänderten Dateien auch wirklich eine sinnvolle Änderung (im Gegensatz zu z.B. nur Whitespace-Änderungen)? | ||
- [x] Ist der Fork auf dem aktuellen Stand des zentralen Repositories und können die Änderungen automatisch gemerged werden? | ||
- [x] Ist der GitHub Actions CI-Build erfolgreich und ohne Test Failures durchgelaufen? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this heading now, would you agree? It is clear from the content of the document that the language is English.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This would also reduce the heading levels which would serve the readability and visual hierarchy!
Which would also need to be adjusted