From f1bdb7f8346503b7a33b44618f7a9f58f826c78c Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:08:56 +0200 Subject: [PATCH 1/6] docs(contributing): add contribution guidelines for the flutter_policy_engine project --- CONTRIBUTING.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e271d7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contributing to flutter_policy_engine + +Thank you for your interest in contributing! We welcome contributions from everyone. If you are not a direct collaborator, please follow the **fork-and-pull-request** workflow described below. + +## Branch Strategy + +- **develop**: All external pull requests must target the `develop` branch. This is where active development happens. +- **main**: The `main` branch is reserved for stable releases. It is updated internally by the maintainers via a pull request from `develop` to `main`. +- **Do not submit pull requests directly to `main`.** + +## 1. Prerequisites + +- Ensure you have a [GitHub account](https://github.com/). +- Install [Git](https://git-scm.com/) and [Flutter](https://flutter.dev/docs/get-started/install) on your machine. +- Familiarize yourself with our [README.md](./README.md) and project structure. + +## 2. Forking the Repository + +- Navigate to the [flutter_policy_engine GitHub page](https://github.com/your-org/flutter_policy_engine). +- Click the **Fork** button (top right) to create your own copy of the repository. + +## 3. Cloning Your Fork + +- Clone your fork to your local machine: + ```sh + git clone https://github.com/your-username/flutter_policy_engine.git + cd flutter_policy_engine + ``` + +## 4. Creating a Feature Branch + +- Always create a new branch for your work: + ```sh + git checkout -b feature/your-feature-name + ``` +- Use descriptive branch names (e.g., `feature/add-logging`, `fix/null-pointer-issue`). + +## 5. Making Changes + +- Make your changes in the appropriate files. +- Follow the language and framework conventions (Dart/Flutter best practices). +- Write clear, self-documenting code. Add docstrings for public APIs and explain the "why" in comments if needed. +- Add or update tests for your changes. + +## 6. Keeping Your Fork Up to Date + +- Sync your fork with the upstream repository to avoid merge conflicts: + ```sh + git remote add upstream https://github.com/your-org/flutter_policy_engine.git + git fetch upstream + git merge upstream/develop + ``` + +## 7. Commit Messages + +- Write concise, meaningful commit messages. +- Use the present tense (e.g., "Add feature X", "Fix bug Y"). +- Group related changes into a single commit when possible. + +## 8. Submitting a Pull Request + +- Push your branch to your fork: + ```sh + git push origin feature/your-feature-name + ``` +- Go to your fork on GitHub and click **Compare & pull request**. +- **Set the base branch to `develop` in the main repository.** +- Fill out the PR template, describing your changes and referencing any related issues. +- Submit the pull request to the `develop` branch. + +## 9. Code Review Process + +- Your PR will be reviewed by maintainers. +- Be responsive to feedback and make requested changes. +- Once approved, your PR will be merged into `develop`. +- The `main` branch is updated internally by maintainers via a separate pull request from `develop` to `main`. + +## 10. Additional Guidelines + +- Ensure all tests pass before submitting your PR. +- Follow our code style and linting rules (see `analysis_options.yaml`). +- Do not include unrelated changes in your PR. +- If your change is significant, consider updating the documentation. + +## 11. Contact + +If you have questions, open an issue or contact the maintainers via GitHub Discussions or Issues. + +--- + +Thank you for helping make this project better! From f807e46148c580ec94eb21c63dfbbc6d24080372 Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:12:30 +0200 Subject: [PATCH 2/6] docs(pr-template): add a pull request template to standardize contributions --- .github/pull_request_template.md | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..076199f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,33 @@ +# Pull Request Template + +## Summary + + + +## Motivation & Context + + + +## Related Issues + + + +## Implementation Details + + + +## How Has This Been Tested? + + + +## Checklist + +- [ ] My code follows the project's code style and conventions +- [ ] I have added/updated relevant documentation +- [ ] I have added/updated tests to cover my changes +- [ ] All existing and new tests pass locally +- [ ] I have considered security and data validation aspects + +## Notes for Reviewers + + From 54dc257c83e19e02a88e1042c5ceaf992d6f7070 Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:36:51 +0200 Subject: [PATCH 3/6] docs(code-of-conduct): add Contributor Covenant Code of Conduct to establish community standards --- CODE_OF_CONDUCT.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1f12fd4 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant 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. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at davidgarcia93.github@gmail.com. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). + +For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). From e645ffe319cbb0919e7a0c43af11819cb119228c Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:39:30 +0200 Subject: [PATCH 4/6] docs(issue-templates): add bug report and feature request templates to enhance issue tracking --- .github/ISSUE_TEMPLATE/bug_report.md | 35 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 21 ++++++++++++ .github/pull_request_template.md | 41 ++++++++++++----------- 3 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..29e9d59 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: "Bug report" +description: "Report a reproducible bug or regression." +labels: [bug] +--- + +## Describe the bug + +A clear and concise description of what the bug is. + +## To Reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +2. Run '...' +3. See error + +## Expected behavior + +A clear and concise description of what you expected to happen. + +## Actual behavior + +What actually happened instead? + +## Environment (please complete the following information): + +- OS: [e.g. iOS, Android] +- Dart/Flutter version: [e.g. 3.0.0, 2.10.0] +- Library version: [e.g. 1.2.3] + +## Additional context + +Add any other context about the problem here. Include logs, error messages, or screenshots if possible. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..670b292 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: "Feature request" +description: "Suggest an idea or enhancement for this project." +labels: [enhancement] +--- + +## Is your feature request related to a problem? Please describe. + +A clear and concise description of what the problem is. Ex: I'm always frustrated when [...] + +## Describe the solution you'd like + +A clear and concise description of what you want to happen. + +## Describe alternatives you've considered + +A clear and concise description of any alternative solutions or features you've considered. + +## Additional context + +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 076199f..f8f2580 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,33 +1,34 @@ -# Pull Request Template +# Pull Request -## Summary +## Description - +Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. -## Motivation & Context +Fixes # (issue) - +## Type of change -## Related Issues - - - -## Implementation Details - - +- [ ] Bug fix +- [ ] New feature +- [ ] Breaking change +- [ ] Documentation update +- [ ] Other (please describe): ## How Has This Been Tested? - +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. ## Checklist -- [ ] My code follows the project's code style and conventions -- [ ] I have added/updated relevant documentation -- [ ] I have added/updated tests to cover my changes -- [ ] All existing and new tests pass locally -- [ ] I have considered security and data validation aspects +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules -## Notes for Reviewers +## Additional context - +Add any other context or screenshots about the pull request here. From 9e2ff7b477deaeb7479f7b7924b11dc25315c1d0 Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:41:30 +0200 Subject: [PATCH 5/6] docs(templates): add issue templates for bug reports and feature requests to improve issue tracking --- SECURITY.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8cef393 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,26 @@ +# Security Policy + +## Reporting a Vulnerability + +If you discover a security vulnerability in this project, please report it privately. Do **not** create a public issue. Instead, email the maintainers at: + +**davidgarcia93.github@gmail.com** + +Please include as much detail as possible to help us understand and address the issue quickly: + +- Description of the vulnerability +- Steps to reproduce (if applicable) +- Potential impact +- Any suggested mitigation or patch + +We will acknowledge receipt of your report as soon as possible and work to provide a status update or resolution in a timely manner. + +## Responsible Disclosure + +We ask that you: + +- Give us a reasonable amount of time to address the issue before disclosing it publicly. +- Do not exploit the vulnerability or share it with others before it is resolved. +- Act in good faith to avoid privacy violations, data destruction, or service disruption. + +Thank you for helping keep this project and its users safe! From 83515d349ba508658d5690d538cdabde952ca240 Mon Sep 17 00:00:00 2001 From: David Garcia Ruiz Date: Thu, 3 Jul 2025 23:49:27 +0200 Subject: [PATCH 6/6] chore(pubspec): update pubspec.yaml for better project visibility --- pubspec.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index bd3e9ea..c7ac85e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,23 @@ name: flutter_policy_engine description: "A new Flutter package project." version: 0.0.1 -homepage: +# homepage: https://github.com/davidgarcia93/flutter_policy_engine +repository: https://github.com/davidgarcia93/flutter_policy_engine +issue_tracker: https://github.com/davidgarcia93/flutter_policy_engine/issues +documentation: https://github.com/davidgarcia93/flutter_policy_engine#readme +topics: + - flutter + - policy + - engine + - authorization +publish_to: "https://pub.dev" +# funding: +# - https://github.com/sponsors/davidgarcia93 +# maintainers: +# - davidgarcia93 environment: - sdk: '>=3.4.1 <4.0.0' + sdk: ">=3.4.1 <4.0.0" flutter: ">=1.17.0" dependencies: