Skip to content

Commit

Permalink
Add initial contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
samporapeli committed Oct 6, 2020
1 parent 7059a4d commit 19c39ac
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contribution Guidelines
Here are some guidelines for contributing to Ilmomasiina. As the name suggests, these are not strict rules.

## Creating issues
Issues are great for tracking suggestions, bug reports and other stuff.
1. Head to [issues](https://github.com/athenekilta/ilmomasiina/issues) and click `New issue`.
1. Write a clear title, that gives an idea what your issue is all about. Example: `Suggestion: Add contribution guidelines` or `Event description sometimes overflows`.
1. Write a descriptive comment about the bug/feature/idea you have.
1. Add a screenshot of the issue/idea, if applicable.
1. If you have an idea how this could be solved, you can add it to the description.

## Adding commits
1. If you have write access to this repository, you can create a new branch directly to this repo. Otherwise, you should fork the repository.
1. Change files, commit (see below), push
1. When the change is ready for review, create a pull request
1. Add a reviewer or two - the CTO of Athene is always a good choice (see [https://athene.fi/hallinto/toimihenkilot/](https://athene.fi/hallinto/toimihenkilot/))
1. Add descriptive comment: what is changed and why. A screenshot of change is not a bad idea.
1. Create your pull request :tada:

## Commits and commit messages
### When to commit
Aim to commit only one change at a time, and to include the one change completely in one commit.
### How to write great commit messages
The first line is the subject line. Use imperative tense and try to summarize the change in 50 characters (at most). Subject starts with a capital letter and does not end with a period. Sometimes the subject is not enough, then you should add one blank line after the subject line and write freely about the change, preferably what has been changed and why. Also, include any issues that are related to this commit.
#### Example
```
Add Ubuntu related instructions
Previously setup instructions were MacOS specific, this commit adds Ubuntu related instuctions (mysql setup is different).
Fixes #1337
```

## Code style
TODO
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,7 @@ Ilmomasiina is Athene's event registration system.
- npm `^5.6.0`
- MySQL `^8.0`

These are automatically installed when you use the Docker container.

## Using Docker container
In project root directory
```bash
docker-compose up
```
This should build and run the environment so that it is accesible at [localhost:3000](http://localhost:3000). You will need to create an `.env` file in project root (see [ENV.md](ENV.md)).

### Create fake data
Use `docker exec ilmomasiina_backend_1 npm run create-fake-data` to create some data to dockerized Ilmomasiina. The server does not like an empty database, so this is a really good idea to do when first starting the server.

## MySQL Setup
Only follow this if you don't use the Docker container.

## MYSQL Setup
### Mac
1. Install `mysql` (8.x) with Homebrew (https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e)
2. Start the mysql service with `brew services start mysql`
Expand All @@ -55,7 +41,6 @@ Only follow this if you don't use the Docker container.
7. Follow Mac instructions step 6

## Getting started
If you are using the Docker container, only follow step 1 as rest are automatically executed.

1. Create an `.env` file at the root of the project. For the contents of the .env file, check [ENV.MD](./ENV.MD)
2. `npm install`
Expand All @@ -64,7 +49,7 @@ If you are using the Docker container, only follow step 1 as rest are automatica
**Optional**: You can create mockup data for development by running `npm run create-fake-data`. During development, database can be resetted with `npm run reset-db`.

### Troubleshooting (Ubuntu)
If `npm start` gives error `Error: You must provide a 'secret' in your authentication configuration`, it probably means that the `.env` file is not loaded correctly. A quick fix for this is to run `source .env`.
If `npm start` gives error `Error: You must provide a 'secret' in your authentication configuration`, it probably means that the `.env` file is not loaded correctly. A quick fix for this is to either use `export VARIABLE=value` for all the variables.

## Mailgun setup

Expand Down Expand Up @@ -133,4 +118,4 @@ See docs folder.

## Contributing

All help is appreciated. Please contact a fellow committer first.
All help is appreciated. Please contact a fellow committer first and see [CONTRIBUTING.md](CONTRIBUTING.md).

0 comments on commit 19c39ac

Please sign in to comment.