Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 2.65 KB

CONTRIBUTING.md

File metadata and controls

94 lines (64 loc) · 2.65 KB

CTFNote - Contribution Guide

We have a Discord server where we discuss the development and feature of CTFNote.

When contributing to this repository, please first discuss the change you wish to make via issue with the collaborators of this repository before making a change, or have a chat in Discord if you do not want to create a full issue yet.

Git process

In order to push new code on this repository, you first have to create a new fork within your github workspace.

Once your fork is created (https://github.com/<your_username>/CTFNote), you can create a new branch starting with the associated issue number in the name and start working on it.

If you start from scratch and no issues are associated with your changes, you can create a branch starting with '0-'.

$ git checkout -b <issue-number>-<branch-name>

Examples of branch name:

  • 132-add-new-feature
  • 343-add-past-ctf-role
  • 13-fix-bug-in-password-reset
  • 37-leak-flag-to-TFNS
  • 0-contribution-guide

Once you think the job is done, issue the pull request and target the main branch of the official CTFNote repository.

You can also create the pull request before finishing the job but don't forget to add "WiP: " as a suffix in the title to let the collaborators know you are still working on the request.

Deploying the dev version

Prerequisites

Install the git hooks

Go at the root folder and install the dependencies and install the git hooks:

$ yarn

This should run the prepare script and install the linting pre-commit hooks:

➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 103ms

Start the third party containers

$ docker compose \
    -f docker-compose.dev.yml \
    up -d hedgedoc db

Start the API

$ cd api
api/ $ yarn # Install the dependencies
api/ $ yarn dev # Run the dev version (hot reloading included)

Start the Front

$ cd front
front/ $ yarn # Install the dependencies
front/ $ yarn dev # Run the dev version (hot reloading included)

Exposed endpoints

The following endpoint are exposed and can be used in the developpement environment

Review

To merge a pull request, a review of a maintainer is required.