From a36287a6271b70724671da8bf7cf0499e407abd9 Mon Sep 17 00:00:00 2001 From: devitway Date: Wed, 18 Mar 2026 12:22:10 +0000 Subject: [PATCH] community: add issue/PR templates, code of conduct, update contributing guide --- .github/ISSUE_TEMPLATE/bug_report.yml | 39 ++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 30 +++++++++++ .github/pull_request_template.md | 15 ++++++ CODE_OF_CONDUCT.md | 36 +++++++++++++ CONTRIBUTING.md | 61 +++++++++++++--------- 5 files changed, 157 insertions(+), 24 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CODE_OF_CONDUCT.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..aaf7d20 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,39 @@ +name: Bug Report +description: Report a bug or unexpected behavior +labels: ["bug"] +body: + - type: textarea + id: description + attributes: + label: Description + description: What happened? What did you expect? + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: How can we reproduce the issue? + - type: input + id: version + attributes: + label: NORA version + placeholder: "0.2.32" + - type: dropdown + id: protocol + attributes: + label: Registry protocol + options: + - Docker + - npm + - Maven + - PyPI + - Cargo + - Raw + - UI/Dashboard + - Other + - type: textarea + id: logs + attributes: + label: Logs / error output + render: shell diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..f3ec16e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,30 @@ +name: Feature Request +description: Suggest a new feature or improvement +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What problem does this solve? + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed solution + description: How would you like it to work? + - type: dropdown + id: protocol + attributes: + label: Related protocol + options: + - Docker + - npm + - Maven + - PyPI + - Cargo + - Raw + - CLI + - UI/Dashboard + - General diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..6371e25 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## What does this PR do? + + + +## Related issue + + + +## Checklist + +- [ ] `cargo fmt` passes +- [ ] `cargo clippy` passes with no warnings +- [ ] `cargo test --lib --bin nora` passes +- [ ] New functionality includes tests +- [ ] CHANGELOG.md updated (if user-facing change) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..d3f8422 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,36 @@ +# Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to a positive environment: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community + +Examples of unacceptable behavior: + +* The use of sexualized language or imagery, and sexual attention or advances +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information without explicit permission + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the project team at security@getnora.io. All complaints will be +reviewed and investigated promptly and fairly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5aaabda..d548ac9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,58 +14,71 @@ Thank you for your interest in contributing to NORA! # Install Rust (if needed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -# Enable pre-commit hooks (important!) -git config core.hooksPath .githooks - # Build -cargo build +cargo build --package nora-registry -# Run tests -cargo test +# Run tests (important: always use --lib --bin nora to skip fuzz targets) +cargo test --lib --bin nora + +# Run clippy +cargo clippy --package nora-registry -- -D warnings + +# Format +cargo fmt # Run locally cargo run --bin nora -- serve ``` +## Before Submitting a PR + +```bash +cargo fmt --check +cargo clippy --package nora-registry -- -D warnings +cargo test --lib --bin nora +``` + +All three must pass. CI will enforce this. + ## Code Style - Run `cargo fmt` before committing -- Run `cargo clippy` and fix warnings +- Fix all `cargo clippy` warnings - Follow Rust naming conventions +- Keep functions short and focused +- Add tests for new functionality ## Pull Request Process -1. Update documentation if needed -2. Add tests for new features -3. Ensure all tests pass: `cargo test` -4. Ensure code is formatted: `cargo fmt --check` -5. Ensure no clippy warnings: `cargo clippy` +1. Update CHANGELOG.md if the change is user-facing +2. Add tests for new features or bug fixes +3. Ensure CI passes (fmt, clippy, test, security checks) +4. Keep PRs focused — one feature or fix per PR ## Commit Messages Use conventional commits: -- `feat:` - new feature -- `fix:` - bug fix -- `docs:` - documentation -- `style:` - formatting -- `refactor:` - code refactoring -- `test:` - adding tests -- `chore:` - maintenance +- `feat:` new feature +- `fix:` bug fix +- `docs:` documentation +- `test:` adding or updating tests +- `security:` security improvements +- `chore:` maintenance -Example: `feat: add OAuth2 authentication` +Example: `feat: add npm scoped package support` ## Reporting Issues -- Use GitHub Issues +- Use GitHub Issues with the provided templates - Include steps to reproduce -- Include NORA version and OS +- Include NORA version (`nora --version`) and OS ## License By contributing, you agree that your contributions will be licensed under the MIT License. -## Contact +## Community -- Telegram: [@DevITWay](https://t.me/DevITWay) +- Telegram: [@getnora](https://t.me/getnora) - GitHub Issues: [getnora-io/nora](https://github.com/getnora-io/nora/issues)