From d04b5cb3c7858170015297969898f9691d8b9e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20TANKOUA?= Date: Tue, 9 Jan 2018 23:43:17 +0100 Subject: [PATCH 1/2] Init contribution guide --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 40 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..300e713 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ + +This repo follows a standard fork and pull model for contributions via GitHub pull requests. Thus, the contributing process looks as follows: + +0. [Pick an issue](#pick-an-issue) +1. [Write code](#write-code) +2. [Write tests](#write-tests) +3. [Write docs](#write-docs) +4. [Submit a PR](#submit-a-pr) + +# Pick an issue + +* Set yourself as assignee +* On Github, leave a comment on the issue you picked to notify others that the issues is taken + +# Write Code + +We use [WartRemover](http://www.wartremover.org/doc/warts.html) for linting and [Scalafmt](http://scalameta.org/scalafmt/). +TODO: add style guide + +# Write Tests + +TODO: Add tests + define test conventions + +# Submit a PR + +- PR should be submitted from a separate branch (use `git checkout -b task/adding-awesome-feature`) +- Use the following nomenclature for branch name: + - for a fix: `fix/quick-description` + - for a task: `task/quick-description` +- PR's commit message should use present tense +- PR worflow with github labels: + - `WIP`: more work need to be done on the PR (can be used to collaborate) + - `requires-review`: to ask for review + - `requires-changes`: some changes need to be done on the PR + - `merge-ready`: PR can be merged (at least one approve review + CI OK + no conflicts + up to date with master) +- PR should generally contain only one commit (use git commit --amend and git --force push or squash existing commits into one) diff --git a/README.md b/README.md index f62d5f9..660b4ba 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # query-monad-example Project for the article **Functional database programming with Play Anorm through the `Reader Monad`** + +# CONTRIBUTING + +Please take a look at the [Contribution guide](CONTRIBUTING.md) From 343d40a5ea5c3a2780f922cbd85c34cdeaf779c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20TANKOUA?= Date: Sun, 21 Jan 2018 01:57:05 +0100 Subject: [PATCH 2/2] Add github templates --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 4 +-- .github/ISSUE_TEMPLATE.md | 36 ++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 20 ++++++++++++ README.md | 2 +- 4 files changed, 59 insertions(+), 3 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (89%) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 89% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 300e713..e8684a4 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,8 +14,8 @@ This repo follows a standard fork and pull model for contributions via GitHub pu # Write Code -We use [WartRemover](http://www.wartremover.org/doc/warts.html) for linting and [Scalafmt](http://scalameta.org/scalafmt/). -TODO: add style guide +We use [WartRemover](http://www.wartremover.org/doc/warts.html) for linting and [Scalafmt](http://scalameta.org/scalafmt/) for formatting. +Please run `scalafmt`command before committing. CI will fail on any formatting issue. # Write Tests diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..0cb9d11 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,36 @@ + +### Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10) + +Use `uname -a` if on Linux. + +### JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing) + +Paste the output from `java -version` at the command line. + +### Library Dependencies + +If this is an issue that involves integration with another system, include the exact version and OS of the other system, including any intermediate drivers or APIs i.e. if you connect to a PostgreSQL database, include both the version / OS of PostgreSQL and the JDBC driver version used to connect to the database. + +### Expected Behavior + +Please describe the expected behavior of the issue, starting from the first action. + +1. +2. +3. + +### Actual Behavior + +Please provide a description of what actually happens, working from the same starting point. + +Be descriptive: "it doesn't work" does not describe what the behavior actually is -- instead, say "an exception occured when executing a query." Copy and paste logs. + +1. +2. +3. + +### Reproducible Test Case + +Please provide a PR with a failing test. + +If the issue is more complex or requires configuration, please provide a link to a project on Github that reproduces the issue. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e3ee92e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +# Pull Request Checklist + +* [ ] Have you read through the [contributor guide](CONTRIBUTING.md)? +* [ ] Have you added tests for any changed functionality? + +## Fixes + +Fixes #xxxx + +## Purpose + +What does this PR do? + +## Background Context + +Why did you take this approach? + +## References + +Are there any relevant issues / PRs ? diff --git a/README.md b/README.md index 660b4ba..78b887b 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Project for the article **Functional database programming with Play Anorm throug # CONTRIBUTING -Please take a look at the [Contribution guide](CONTRIBUTING.md) +Please take a look at the [Contribution guide](.github/CONTRIBUTING.md)