From f20d4eaa657648e560824512d147bce5df3ec51d Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Thu, 8 Apr 2021 20:03:40 +0100 Subject: [PATCH 1/2] Add community health files --- .github/CODE_OF_CONDUCT.md | 101 +++++++++++++++++++++++++++++++++++++ .github/CONTRIBUTING.md | 66 ++++++++++++++++++++++++ .github/FUNDING.yml | 2 + 3 files changed, 169 insertions(+) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/FUNDING.yml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b04e557 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,101 @@ +The primary source of the Code of Conduct is at [mautic.org](https://www.mautic.org/code-of-conduct/) - it is reproduced here for reference. + +## 1. Purpose + +A primary goal of the Mautic community is to support you and your business in the development, use and implementation of Mautic. It’s to be inclusive and add value to the largest number of participants, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all. + +This code of conduct outlines our expectations for all those who participate in our community, whether in-person or online, as well as the consequences for unacceptable behavior. + +Your participation is contingent upon following these guidelines in all Mautic activities, including but not limited to: + +* Using Mautic community resources. +* Working with other Mauticians and other Mautic community participants whether virtually or co-located. +* Representing Mautic at public events. +* Representing Mautic in social media (official accounts, personal accounts, Facebook pages and groups). +* Participating in Mautic sprints and training events. +* Participating in Mautic-related forums, mailing lists, wikis, websites, chat channels, bugs, group or person-to-person meetings, and Mautic-related correspondence. + +We invite all those who participate in Mautic activities online to help us create safe and positive experiences for everyone, everywhere. + + +## 2. Open Source & Culture Citizenship + +A supplemental goal of this Code of Conduct is to increase open source and culture citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. + +Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. + +If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, please recognize their efforts. + +## 3. Welcoming to all +We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience or job role, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, national origin, citizenship and immigration status, neurodiversity, mental health or socio-economic status. + + +## 4. Expected Behavior + +The following behaviors are expected and requested of all community members: + +* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. +* Exercise consideration and respect in your speech and actions. +* Attempt collaboration before conflict. +* Guide conversations toward issue resolution. +* Refrain from demeaning, discriminatory, or harassing behavior and speech. + +Alert Mautic team members if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. + +## 5. Unacceptable Behavior + +The following behaviors are considered harassment and are unacceptable within our community: + +* **Violence and Threats of Violence** are not acceptable - online or offline. This includes incitement of violence toward any individual, including encouraging a person to commit self-harm. This also includes posting or threatening to post other people’s personally identifying information (“doxxing”) online. +* **Public or private harassment** is never acceptable in any form. +* **Personal Attacks** Conflicts will inevitably arise, but frustration should never turn into a personal attack. It is not okay to insult, demean or belittle others. Attacking someone for their opinions, beliefs and ideas is not acceptable. It is important to speak directly when we disagree and when we think we need to improve, but such discussions must be conducted respectfully and professionally, remaining focused on the issue at hand. +* **Derogatory Language** Hurtful or harmful language is never acceptable in any context related to: background, family status, gender, gender identity or expression, marital status, sex, sexual orientation, personal appearance, body size, native language, age, ability, neurodiversity, mental health, race and/or ethnicity, national origin, citizenship and immigration status, socioeconomic status, religion, geographic location. +* **Unwelcome Sexual Attention or Physical Contact** Unwelcome sexual attention or unwelcome physical contact is not acceptable. This includes sexualized comments, jokes or imagery in interactions, communications or presentation materials, as well as inappropriate touching, groping, or sexual advances. This includes touching a person without permission, including sensitive areas such as their hair, pregnant stomach, mobility device (wheelchair, scooter, etc) or tattoos. This also includes physically blocking or intimidating another person. Physical contact or simulated physical contact (such as emojis like “kiss”) without affirmative consent is not acceptable. This includes sharing or distribution of sexualized images or text. +* **Disruptive Behavior** Sustained disruption of events, forums, or meetings, including talks and presentations, will not be tolerated. This includes spamming community discussions with the solicitation of unwanted products or services. +* **Influencing Disruptive Behavior** We will treat influencing or leading such activities the same way we treat the activities themselves, and thus the same consequences apply. + +## 6. Consequences of Unacceptable Behavior + +Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. + +Anyone asked to stop unacceptable behavior is expected to comply immediately. + +If a community member engages in unacceptable behavior, we may take any action deemed appropriate, up to and including a temporary ban or permanent expulsion from the community without warning. Examples of sanctions which may be applied include but is not limited to: +* Verbal warnings. +* Written warnings. +* Temporary absence from participation. +* Long-term absence from participation. +* Being required to follow a conduct agreement that dictates the process of returning to the community. + + +## 7. Reporting Guidelines +If you are subject to or witness unacceptable behavior, or have any other concerns, please notify us as soon as possible by emailing info@mautic.org, or contacting a Mautic team member on the specific platform. + +Processes for dealing with breaches of the Code of Conduct can be found [here][coc-breaches]. + +## 8. Addressing Grievances +Only permanent resolutions (such as bans) may be appealed. To appeal a decision, contact the Mautic team at info@mautic.org with your appeal and the team will review the situation. + +## 9. Scope +We expect all community participants (contributors, moderators and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community affairs. + +While this code of conduct is specifically aimed at Mautic’s official resources and community, we recognize that it is possible for actions taken outside of Mautic’s official online or in person spaces to have a deep impact on community health. + +Resources or incidents which break this code of conduct for any reason in a non-Mautic community location will be considered in the same way as resources or incidents from owned channels, and subject to the same sanctions. + +## 10. Contact info +For more information, please contact info@mautic.org. + +## 11. License and attribution +This Code of Conduct is directly adapted from the Stumptown Syndicate and distributed under a [Creative Commons Attribution-ShareAlike license][cc-by-sa]. + +Additional text from [Mozilla Community Participation Guidelines][mozilla-guidelines] distributed under a [Creative Commons Attribution-ShareAlike license][cc-by-sa]. + +Reviewed and updated using the [Mozilla Code of Conduct Assessment Tool][mozilla-tool]. + +[coc-breaches]: +[mozilla-guidelines]: +[cc-by-sa]: +[mozilla-tool]: + +(Code of Conduct is subject to change without notice). \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..53989ed --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,66 @@ +## Reporting Security Vulnerabilities + +If you think that you have found a security vulnerability, please email security@mautic.org with as much detail as possible. The core team will review the vulnerability and if found applicable, will create the patch in a private repository. The vulnerability will be disclosed once the patch has been included into a release. + +## Contributing Code + +Development is open and available to any member of the Mautic community. All fixes and improvements are done through pull requests to the code. This code is open source and publicly available. + +### Developer Documentation + +Developer documentation is available at [https://developer.mautic.org](https://developer.mautic.org). To add additions or corrects to the documentation, submit Issues or Pull Requests against [https://github.com/mautic/developer-documentation](https://github.com/mautic/developer-documentation). + +### Core Feature Development Procedures + +Pull Requests with additional features should be created with the Mautic Core goals in consideration. Any features that are created for core that don’t follow the overall goals may not be included. + +In addition to following the general direction of the development goals, the pull request code must be well-formed following coding standards and guidelines. If you wish to target a specific release version number for the feature, its best to make the pull request early so any feedback from the core team can be implemented and adequate testing can be performed. + +Features that are determined not to fit within the direction of the Mautic Core goals are more than welcome to be created as plugins instead. + +### Code Contribution Requirements + +#### Code Standards + +Mautic follows [Symfony's coding standards](http://symfony.com/doc/current/contributing/code/standards.html) by implementing pre-commit git hook running [php-cs-fixer](https://github.com/friendsofphp/php-cs-fixer), which is installed and updated with `composer install`/`composer update`. + +All code styling is handled automatically by the aforementioned git hook. In case if you setup git hook correctly (which is true if you ever run `composer install`/`composer update` before creating a pull request), you can format your code as you like - it will be converted to Mautic code style automatically. + +#### Automated Tests + +All code contributions should include adequate and appropriate unit tests using [PHPUnit](https://phpunit.de/manual/5.7/en/index.html) and/or Symfony functional tests ([https://symfony.com/doc/2.8/testing.html](https://symfony.com/doc/2.8/testing.html)). Pull Requests without these tests will not be merged. + +#### Pull Request Description + +When creating a new Pull Request, the description template should be filled appropriately in detail. Any Pull Request that does not have an appropriate description will not be considered for merge. + +#### Documentation + +Each new feature should include a reference to a pull request in our [End User Documentation](https://github.com/mautic/documentation) repository or [Developer Documentation](https://github.com/mautic/developer-documentation) repository if applicable. + +## Core Development Rules + +Pull requests and code submissions are decided upon by the release leader and the core team. When a decision is not clearly evident then the following voting process will be implemented. + +### Voting Policy + +Votes are cast by all members of the core team. Votes can be changed at any time during the discussion. Positive votes require no explanation. A negative vote must be justified by technical or objective logic. A core team member cannot vote on any code they submit. + +### Merging Policy + +The voting process on any particular pull request must allow for enough time for review by the community and the core team. This involves a minimum of 2 days for minor modifications and minimum of 5 days for significant code changes. Minor changes involve typographical errors, documentation, code standards, minor CSS, javascript, and HTML modifications. Minor modifications do not require a voting process. All other submissions require a vote after the minimum code review period and must be approved by two or more core members (with no core members voting against). + +### Core Membership Application + +Core team members are based on a form of meritocracy. We actively seek to empower our active community members and those demonstrating increased involvement will be given everything needed for their continued success. + +### Core Membership Revocation + +A Mautic Core membership can be revoked for any of the following reasons: + +- Refusal to follow the rules and policies listed herein +- Lack of activity for the previous 6 months +- Willful negligence or intent to harm the Mautic project +- Upon decision of the project leader + +Revoked members may re-apply for core membership following a 12 month period. \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..3c7ff29 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: mautic +open_collective: mautic \ No newline at end of file From 77ab8ffedf004f8044f034b71dec3378dbfa4af6 Mon Sep 17 00:00:00 2001 From: Ruth Cheesley Date: Thu, 8 Apr 2021 20:04:01 +0100 Subject: [PATCH 2/2] Add release workflow and release notes workflow --- .github/workflows/release-notes.yml | 9 ++++ .github/workflows/release.yml | 64 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/release-notes.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml new file mode 100644 index 0000000..f51b613 --- /dev/null +++ b/.github/workflows/release-notes.yml @@ -0,0 +1,9 @@ +changelog: + repository: mautic/mautic-wordpress + sections: + - title: "✨ Enhancements" + labels: ["enhancement", "feature"] + - title: "🐞 Bugs" + labels: ["bug", "regression"] + contributors: + title: "💖 Contributors" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..745bf73 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,64 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Upload Release Asset + +jobs: + build: + name: Upload Release Asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get tag name + run: echo "PLUGIN_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + + - name: "Try generating the release notes" + run: | + # Version as indicated in the metadata, e.g., 3.2.5-rc + METADATA_VERSION=${{ env.PLUGIN_VERSION }} + # We only need the first part of the version, e.g. 3.2.5, for the milestone recognition. Split on the dash (-) character. + METADATA_ARRAY=(${METADATA_VERSION//-/ }) + POTENTIAL_MILESTONE=${METADATA_ARRAY[0]} + echo "Will try to create changelog based on milestone ${POTENTIAL_MILESTONE} if it exists..." + # In case the Jar below fails, fall back to a default text + echo "PLUGIN_CHANGELOG=\"**Based on plugin's version number (${POTENTIAL_MILESTONE}), we tried finding a milestone with the same name. We couldn't find it though. Make sure it exists (and re-run GitHub Actions) or add a changelog manually!**\"" >> $GITHUB_ENV + # Download changelog generator + wget -q https://github.com/spring-io/github-changelog-generator/releases/download/v0.0.5/github-changelog-generator.jar + # Copy of release-notes.yml to root folder needed, since the Jar can't read from hidden folders anymore (bug): https://github.com/Decathlon/release-notes-generator-action/pull/21 + cp ./.github/release-notes.yml ./release-notes.yml + java -jar ./github-changelog-generator.jar --spring.config.location="./release-notes.yml" ${POTENTIAL_MILESTONE} plugin-changelog.txt || true + if [[ -f plugin-changelog.txt ]]; then + echo 'PLUGIN_CHANGELOG<> $GITHUB_ENV + cat plugin-changelog.txt >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + fi + - name: Build project # This would actually build your project, using zip for an example artifact + run: | + zip --junk-paths my-artifact README.md + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.PLUGIN_VERSION }} + release_name: Mautic WordPress Plugin v${{ env.PLUGIN_VERSION }} + draft: true + prerelease: false + body: | + ${{ env.PLUGIN_CHANGELOG }} + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./my-artifact.zip + asset_name: mautic-wordpress-plugin-v${{ env.PLUGIN_VERSION }}.zip + asset_content_type: application/zip \ No newline at end of file