Scoring system for Teknikåttan
This is the scoring system for Teknikåttan!
Installing
To install the client and server needed to run the application, look in their respective READMEs for intstructions.
Using
After installing both the client and the server, you are ready to run the application.
This is done in VSCode by pressing ctrl+shift+b
and running the Start client and server
task.
The terminals for the client and server will now be seen on the right and left, respectively.
After making a change to either the client or the server while they are running, simply reload the page to see the changes immediately.
Workflow
You will need to follow the instructions given below to contribute to this project.
Working on an issue
To begin working, you need to choose an issue and create a branch from.
- See all issues by going to
Issues->Boards
. - The issues no one has started on yet are showed in the
Open
tab. Choose one of these by dragging it into theIn progress
tab and opening it. - Add yourself as an asignee (in top right corner).
- Add the current week as a milestone to the issue (to the right).
- Press the little green downarrow on the right of the
Create merge request
button and select and pressCreate branch
. - Open the project in VSCode.
- Type
git pull
. This will fetch the new branch you just created. - Switch to it by running
git checkout <branch>
. (Example:git checkout 5-add-login-api
)
You are now ready to start working on your issue.
Creating a merge request
After solving your issue, you will need to merge your branch into dev
.
This is in two steps:
First you need to prepare your branch to be merged and then create a merge request.
First, prepare your branch to be merged.
- Open the project in VSCode.
- Checkout your branch, if you are not already on it (
git checkout <branch>
). - Run
git pull origin dev
. This will try to merge the latest changes fromdev
into your branch. This can have a few different results:- There will be no changes, which is fine.
- There will be no conflicting changes, which is also fine.
- There will be conflicting changes, in which case you will need to merge it manually (see Merge conflicts) before continuing to the next step.
- Run
git push
.
Your branch is now ready to be merged. The next step is to create the actual merge request.
- On GitLab open
Repository->Branches
. - Find your branch and press
Merge request
. - Press
Merge Requests
on the left, open your merge request and press the greenMark as ready
button (in the top right corner).
The test will then run on your changes in the merge request on GitLab.
After the tests have passed and another person has approved your merged request, you will be able to merge.
To merge your branch the tests will have to pass and another person has to approve your merge request.
When this is done, press the Merge
button.
Merge conflicts
You will need to manually merge if there is a merge conflict between your branch and another.
This is simply done by opening the project in VSCode and going to the Git tab on the left (git symbol).
You will then see som files marked with C
, which indicates that there are conflicts in these files.
You will have to go through all of the merge conflicts and solve them in each file.
A merge typically looks like the code snippet at the bottom of this document in plain text (try opening this in VSCode and see how it looks).
The only thing you really need to do is removing the <<<<<<<
, =======
and >>>>>>>
symbols from the document, although you don't have to do it by hand.
In VSCode, you can simply choose if you want to keep incoming changes (from the branch you merging into), current changes (from your branch) or both.
Solve all the merge conflicts in every file and run the tests to make sure it still works.
When you are done, commit and push your changes.
<<<<<<< file.txt
<Your changes>
=======
<Changes from dev>
>>>>>>> 123456789:file.txt