From d36d6903b3de05273c2b0bee1acb00a96d64f582 Mon Sep 17 00:00:00 2001 From: ABB65 Date: Wed, 28 Oct 2026 15:04:33 +0300 Subject: [PATCH] docs: contributing guide, code of conduct, issue and PR templates Repo-only files; tools/package.py whitelists runtime files, so the plugin archive is unchanged (verified: 0 of these in dist/contentrain-bridge.zip). --- .github/ISSUE_TEMPLATE/bug_report.yml | 52 +++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ .github/ISSUE_TEMPLATE/feature_request.yml | 23 +++++++ .github/pull_request_template.md | 10 +++ CODE_OF_CONDUCT.md | 77 ++++++++++++++++++++++ CONTRIBUTING.md | 49 ++++++++++++++ 6 files changed, 219 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.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 create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..31980eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,52 @@ +name: Bug report +description: An export that fails, or content that comes out missing or wrong. +title: "[Bug]: " +labels: + - bug +body: + - type: markdown + attributes: + value: | + Security issues go to security@contentrain.io, not here (see SECURITY.md). + Do not attach production credentials or a full WordPress export. + - type: input + id: bridge-version + attributes: + label: Bridge version + placeholder: "0.8.4" + validations: + required: true + - type: input + id: environment + attributes: + label: WordPress and PHP versions + placeholder: "WordPress 6.8, PHP 8.2" + validations: + required: true + - type: textarea + id: plugins + attributes: + label: Relevant plugins and theme + description: For example ACF, Yoast SEO, Elementor, the active theme. + - type: textarea + id: summary + attributes: + label: What happened? + description: What you expected in the export, and what you got. + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + placeholder: | + 1. Create a post with ... + 2. Run the export from Tools > Contentrain Bridge + 3. Open ... in the export + validations: + required: true + - type: textarea + id: context + attributes: + label: Extra context + description: Warnings from the export report, PHP error log lines, screenshots. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..05b33ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Report a security issue + url: https://github.com/Contentrain/wordpress-bridge/blob/main/SECURITY.md + about: Report vulnerabilities privately to security@contentrain.io. + - name: Moving a whole site to Astro + url: https://migrate.contentrain.io + about: Questions about Contentrain Migrate, the paid migration service. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..57575f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature request +description: A source the plugin should read, or an improvement to the export. +title: "[Feature]: " +labels: + - enhancement +body: + - type: textarea + id: problem + attributes: + label: Problem to solve + description: What content or setting is not exported today, or what is hard to use? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed change + description: What the export or admin screen should do. + - type: textarea + id: context + attributes: + label: Extra context + description: Plugins involved, example sites (public only), links. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..19085e6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +## What changes + +## Why + +## How it was tested + +- [ ] `php -l` and `composer lint` +- [ ] `npm test` +- [ ] `npm run test:wordpress` (when export behaviour changes) +- [ ] No version bump or `readme.txt` stable tag change diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..aa9d460 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,77 @@ +# 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, caste, color, 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 email 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 +**info@contentrain.io**. + +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. + +## 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][v2.1]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..03d887a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing + +Thanks for helping with Contentrain Bridge, the free WordPress plugin that exports a site's content layer as a Contentrain store. + +## Ways to contribute + +- Report a bug: an export that fails, a field that is missing or wrong, a plugin or theme the export does not read. +- Propose an improvement: a source the plugin should model, a clearer admin screen, better docs. +- Send a pull request with a fix or a test. + +Security issues do not go in public issues. See [SECURITY.md](SECURITY.md). + +## Before you open an issue + +- Use the latest [release](https://github.com/Contentrain/wordpress-bridge/releases/latest). +- Include the WordPress and PHP versions, and the plugins involved (for example ACF, Yoast, a page builder). +- Never attach production credentials or a full WordPress export. A small reproduction (one post type, a few posts) is enough. + +## Development + +The plugin has no runtime dependency and no build step. The checks CI runs are listed in [RELEASING.md](RELEASING.md). The quick ones: + +```sh +find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l +composer install && composer lint +npm ci --ignore-scripts +npm test +``` + +The WordPress acceptance suite runs in Docker: + +```sh +npm run test:wordpress +``` + +## Pull requests + +- Keep a pull request to one change, with a test when behaviour changes. +- The output contract comes from [`@contentrain/types`](https://github.com/Contentrain/ai/tree/main/packages/types). A change to the exported store shape starts there, not in the plugin. +- The plugin must keep passing the official WordPress Plugin Check (`npm run test:plugin`). +- Do not change the version or `readme.txt` stable tag in a pull request. Releases are cut by maintainers. + +## License + +The plugin is licensed under [GPL-2.0-or-later](LICENSE). By opening a pull request, you agree that your contribution is licensed under the same terms. + +## Code of conduct + +This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md).