Skip to content

Commit

Permalink
Add contributing guidelines
Browse files Browse the repository at this point in the history
Closes #78
  • Loading branch information
johnboyes committed Jul 20, 2020
1 parent 1160129 commit 30ff85a
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# How to contribute

Firstly thanks for thinking of contributing - the project is [open source](https://opensource.guide/how-to-contribute/) and all contributions are very welcome :slightly_smiling_face: :boom: :thumbsup:

[How to report a bug or suggest a new feature](#how-to-report-a-bug-or-suggest-a-new-feature)

[How to contribute](#how-to-contribute)

[Local setup](#local-development)
* [Visual Studio Code](#visual-studio-code)
* [Codespaces](#codespaces)
* [Dependencies](#dependencies)
* [Running the tests](#running-the-tests)

## How to report a bug or suggest a new feature

[Create an issue](https://github.com/agilepathway/label-checker/issues), describing the bug or new feature in as much detail as you can.

## How to contribute

* [Create an issue](https://github.com/agilepathway/label-checker/issues) describing the change you are proposing.
* [Create a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests). The project uses the _[fork and pull model](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-collaborative-development-models)_:
* [Fork the project](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks)
* Make your changes on your fork
* [Create the pull request for your changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)
* [Update the tests or add new tests](#running-the-tests) to cover the new behaviour.

## Local development

### Visual Studio Code

The easiest way to set up your development environment (unless you have [Codespaces](#codespaces), which is even easier) is to use [Visual Studio Code](https://code.visualstudio.com/)'s [Remote Containers](https://code.visualstudio.com/docs/remote/containers) functionality:
* [System requirements](https://code.visualstudio.com/docs/remote/containers#_system-requirements)
* [Fork the project](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks)
* [Open the local project folder in a container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container)
* Everything will then be setup for you. You'll be able to run the tests locally.

### Codespaces

If you have access to [GitHub Codespaces](https://github.com/features/codespaces/) (which allows full remote
development from withing your browser) then all you need to do is [fork the project](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks) and open it in Codespaces - easy!

### Local development from scratch

#### Dependencies

* [Go](https://golang.org/)
* [Hoverfly](hoverfly.readthedocs.io) (for [running the tests]((#running-the-tests)))

#### Running the tests

As above, you need [Hoverfly](hoverfly.readthedocs.io) to run the tests:
1. [Download and install Hoverfly](https://docs.hoverfly.io/en/latest/pages/introduction/downloadinstallation.html)
2. [Download the Hoverfly default cert](https://raw.githubusercontent.com/SpectoLabs/hoverfly/master/core/cert.pem)
3. [Add and trust the Hoverfly default cert](https://docs.hoverfly.io/en/latest/pages/tutorials/advanced/configuressl/configuressl.html) [(how to add and trust
a cert)](https://manuals.gfi.com/en/kerio/connect/content/server-configuration/ssl-certificates/adding-trusted-root-certificates-to-the-server-1605.html)

Run the tests:

`go test . -v`

Table tests





0 comments on commit 30ff85a

Please sign in to comment.