From bd358af42edaeb51d6de875e558ae5365680309f Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Fri, 29 Sep 2023 09:28:36 +0300 Subject: [PATCH] Add community health files (#156) ## What? Adds community health files (PR and issue templates, contributing guidelines). ## Why? These files simplify contributions to the project. --- .github/ISSUE_TEMPLATE/bug_report.md | 23 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 ++++++++++ .github/pull_request_template.md | 12 +++++++ .github/workflows/ci.yml | 2 ++ CONTRIBUTING.md | 44 +++++++++++++++++++++++ README.md | 5 +++ 6 files changed, 105 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..2a6f3988 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,23 @@ +--- +name: Bug report +about: Use this template for reporting issues +title: '' +labels: bug +assignees: '' +--- + +## Bug report + + + +### Steps to reproduce + + + +### Expected behavior + + + +### Environment + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..d03a2604 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Use this template to request features +title: '' +labels: feat +assignees: '' +--- + +## Feature request + + + +### Why? + + + +### Alternatives + + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..42dc7358 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +## What? + + + + + +## Why? + + + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47c673f7..423ac879 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,8 @@ jobs: - build - build-msrv if: github.event_name == 'push' + permissions: + contents: write runs-on: ubuntu-latest steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..55a3b01e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing to `jwt-compact` + +This project welcomes contribution from everyone, which can take form of suggestions / feature requests, bug reports, or pull requests. +This document provides guidance how best to contribute. + +## Bug reports and feature requests + +For bugs or when asking for help, please use the bug issue template and include enough details so that your observations +can be reproduced. + +For feature requests, please use the feature request issue template and describe the intended use case(s) and motivation +to go for them. If possible, include your ideas how to implement the feature, potential alternatives and disadvantages. + +## Pull requests + +Please use the pull request template when submitting a PR. List the major goal(s) achieved by the PR +and describe the motivation behind it. If applicable, like to the related issue(s). + +Optimally, you should check locally that the CI checks pass before submitting the PR. Checks included in the CI +include: + +- Formatting using `cargo fmt --all` +- Linting using `cargo clippy` +- Linting the dependency graph using [`cargo deny`](https://crates.io/crates/cargo-deny) +- Running the test suite using `cargo test` + +A complete list of checks can be viewed in [the CI workflow file](.github/workflows/ci.yml). The checks are run +on the latest stable Rust version. + +### MSRV checks + +A part of the CI assertions is the minimum supported Rust version (MSRV). If this check fails, consult the error messages. Depending on +the error (e.g., whether it is caused by a newer language feature used in the PR code, or in a dependency), +you might want to rework the PR, get rid of the offending dependency, or bump the MSRV; don't hesitate to consult the maintainers. + +### No-std support checks + +Another part of the CI assertions is no-std compatibility of the project. To check it locally, install a no-std Rust target +(CI uses `thumbv7m-none-eabi`) and build the project libraries for it. Keep in mind that no-std compatibility may be broken +by dependencies. + +## Code of Conduct + +Be polite and respectful. diff --git a/README.md b/README.md index 4e854158..ce720458 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,11 @@ See the crate docs for more examples of usage. - [justwebtoken.io](https://justwebtoken.io/) – educational mini-website that uses this library packaged in a WASM module. +## Contributing + +All contributions are welcome! See [the contributing guide](CONTRIBUTING.md) to help +you get involved. + ## License Licensed under the [Apache-2.0 license](LICENSE).