From a1605d410dbdff655efc3ec3a265e61c769a758e Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Tue, 3 Oct 2023 10:18:06 -0600 Subject: [PATCH 1/3] chore: add a contributing doc --- CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..379eb59 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# CONTRIBUTING + +Contributions are welcome, and are accepted via pull requests. +Please review these guidelines before submitting any pull requests. + +## Process + +1. Fork the project +1. Create a new branch +1. Code, test, commit and push +1. Open a pull request detailing your changes. Make sure your PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +## Guidelines + +* Please ensure the coding format by running `mix format`. +* You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts. +* Please remember that we follow [SemVer](http://semver.org/). + +## Setup + +Clone your fork, then install the dependencies: + +```bash +mix deps.get +``` + +## Format + +Format your code: +```bash +mix format +``` + +## Lint + +Lint your code with credo and dialyxir: +```bash +mix credo +mix dialyzer +``` + +## Tests + +Run all tests: +```bash +mix test +``` + +## Releasing + +The release process of this repository is automated as much as possible to ensure there isn't a bottle neck, or merged PRs waiting to be deployed. Once a PR is merged it into `main`, a secondary PR will be created or updated with a title like so: `chore(main): release `. This PR will include all of the needed changes for a new release, including an updated `CHANGELOG.md` file, increasing the version in `mix.exs`, and updating any documentation. Once a maintainer merged that PR in, a new release will be created in GitHub and pushed to [hex.pm](https://hex.pm/packages/novu). From d5530596ae06da4278ff495b30ddab6afefbc0e2 Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Tue, 3 Oct 2023 10:20:10 -0600 Subject: [PATCH 2/3] update readme --- README.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e888696..a97f48f 100644 --- a/README.md +++ b/README.md @@ -20,24 +20,8 @@ end ## Documentation -Documentation is available on [HexDocs](https://hexdocs.pm/novu/readme.html). - -## Contributing - -First off, thank you for for showing an interest in contributing to the Elixir SDK for Novu! - -### Coding guidelines - -To ensure consistency throughout the source code, please ensure all code contributed follows the ELixir formatter rules. These are checked on every PR submitted so you will get warnings if the code is unformatted before it's merged in. - -### Documentation - Documentation is generated using `ex_doc` and published to [HexDocs](https://hexdocs.pm/novu/readme.html) on new releases. This is automatic, so our only ask is ensure public functions have proper documentation and examples provided. -### Pull Requests - -Pull requests of all kinds are welcome! Before you open a PR, you will want to ensure your PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format. This lets us automate SemVer versions for release, as well as generate helpful changelog entries. When a PR is submitted, our GitHub actions will ensure the code compiles and tests pass in the latest versions of Elixir, the code follows formatting rules, as well as credo and dialyzer pass. - -### Releasing +## Contributing -The release process of this repository is automated as much as possible to ensure there isn't a bottle neck, or merged PRs waiting to be deployed. Once a PR is merged it into `main`, a secondary PR will be created or updated with a title like so: `chore(main): release `. This PR will include all of the needed changes for a new release, including an updated `CHANGELOG.md` file, increasing the version in `mix.exs`, and updating any documentation. Once a maintainer merged that PR in, a new release will be created in GitHub and pushed to [hex.pm](https://hex.pm/packages/novu). +First off, thank you for for showing an interest in contributing to the Elixir SDK for Novu! We have created a [contributing guide](./CONTRIBUTING.md) that will show you how to setup a development environment and how to open pull requests. From d5f8f50f8232b8cb57740e90c350c64708ac2a8f Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Tue, 3 Oct 2023 10:22:12 -0600 Subject: [PATCH 3/3] add Contributing page to built documentation --- mix.exs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index 6db6b84..83fd37c 100644 --- a/mix.exs +++ b/mix.exs @@ -46,7 +46,7 @@ defmodule Novu.MixProject do defp package do [ - files: ~w(lib mix.exs CHANGELOG.md README.md LICENSE), + files: ~w(lib mix.exs CHANGELOG.md CONTRIBUTING.md README.md LICENSE), licenses: ["MIT"], links: %{ Website: "https://novu.co/", @@ -60,7 +60,11 @@ defmodule Novu.MixProject do [ main: "readme", logo: "priv/assets/logo.png", - extras: ["CHANGELOG.md", "README.md"] + extras: [ + "README.md": [filename: "readme", title: "Readme"], + "CONTRIBUTING.md": [filename: "contributing", title: "Contributing"], + "CHANGELOG.md": [filename: "changelog", title: "Changelog"] + ] ] end end