From 3f32ff0606950aab53f40083fa3a09cdec41cfe5 Mon Sep 17 00:00:00 2001 From: Joe Sepi Date: Fri, 4 Aug 2023 12:19:09 -0400 Subject: [PATCH] coc: removing automation workflow (#1129) --- .github/workflows/patch-code-of-conduct.yml | 31 -------- conduct/COC_PATCHING_SCRIPT.md | 70 ------------------- conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch | 57 --------------- conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md | 44 ------------ 4 files changed, 202 deletions(-) delete mode 100644 .github/workflows/patch-code-of-conduct.yml delete mode 100644 conduct/COC_PATCHING_SCRIPT.md delete mode 100644 conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch delete mode 100644 conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md diff --git a/.github/workflows/patch-code-of-conduct.yml b/.github/workflows/patch-code-of-conduct.yml deleted file mode 100644 index 07904900b..000000000 --- a/.github/workflows/patch-code-of-conduct.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Patch CoC -on: - workflow_dispatch: - push: - branches: - - main - schedule: - - cron: '0 0 * * *' -jobs: - patch: - runs-on: ubuntu-latest - name: Patch - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - persist-credentials: false - - name: Patch CoC - uses: pkgjs/patch-my-code-of-conduct@v1.3.0 - with: - base_url: './conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md' - template_url: 'https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md' - patch_file_path: './conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch' - output_file_path: './CODE_OF_CONDUCT.md' - - uses: gr2m/create-or-update-pull-request-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - body: "Applied the patch to the base Code of Conduct." - commit-message: 'doc: update Code of Conduct' - title: 'doc: update Code of Conduct' diff --git a/conduct/COC_PATCHING_SCRIPT.md b/conduct/COC_PATCHING_SCRIPT.md deleted file mode 100644 index ac6084021..000000000 --- a/conduct/COC_PATCHING_SCRIPT.md +++ /dev/null @@ -1,70 +0,0 @@ -# Code of Conduct Patching Script - -This document explains the knowledge behind the patching script used to make any changes on the `CODE_OF_CONDUCT.md` file. - -The patching script lives under [pkgjs/patch-my-code-of-conduct][project-link] repository. -It is developed as a GitHub workflow to make it easier for projects to adopt into their existing repositories. - -## Goal - -The goal of the patching script is to make Code of Conduct upgrade and review process easier to maintain for open-source projects. -It removes any direct changes done to the original document, and provides an easier to review and accept changes to the document provided by the Contributor Covenant. - -## GitHub Workflow configuration - -The configuration file for the patching script lives inside `.github/workflows/patch-code-of-conduct.yml` file. -The configuration file also includes an additional GitHub workflow to automatically open a pull request in the event of a changed file after the work of the patching scripts job is complete. - -### Settings - -- `base_url`: Base URL is the path to the preamble file (the file that is prepended to the Code of Conduct document). -- `template_url`: It is the URL to the Contributor Covenant website that includes the original unchanged document. -- `patch_file_path`: It is the path to the patching file. -- `output_file_path`: It is the path to the file where the changes should apply to. - -### Files - -- `workflows/patch-code-of-conduct.yml`: This file contains the necessary configuration to setup the patching script. -- `CODE_OF_CONDUCT_PREAMBLE.md`: This file contains the text prepended to the original Code of Conduct file. - It may contain project/organization specific information that may live outside of the definition of the original Code of Conduct versions. -- `CODE_OF_CONDUCT_PATCH.patch`: This file contains a patch generated by the contributors of the project to update **only** the texts defined in the Code of Conduct URL defined by the patching script. - -## Workflows - -### Make a change to `PREAMBLE.md` file - -1. Open a pull-request updating either `CODE_OF_CONDUCT_PATCH.patch` or `CODE_OF_CONDUCT_PREAMBLE.md` file. - The default procedures of merging a pull request will be followed as usual. -1. Upon successful merging the proposed changes to the main branch patching script will open a pull request with a target of `main` branch updating `CODE_OF_CONDUCT.md` file with the proposed changes. -1. Since the approval for the original change is done in step 1, unless there is a bug with the CoC patching script this pull request opened by the bot from the workflow should land without issue. - -### Make a change to `PATCH.patch` file - -1. Copy the original file and rename it as `PREVIOUS_COC.md` -1. Update `PREVIOUS_COC.md` according to your needs. -1. Run the following command to generate the patching file: - `diff -Naur PREVIOUS_COC.md CODE_OF_CONDUCT.md > conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch` -1. Delete the temporary `PREVIOUS_COC.md` file. -1. Push your changes to a new branch and open a pull-request with a target of `main` branch. - -**Testing**: You can run the following command to apply the changes of your patching script to validate the output: - -``` -patch -i conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch CODE_OF_CONDUCT.md --no-backup-if-mismatch -``` - -### Update Code of Conduct version - -1. Update Github Workflow `template_url` attribute. -2. Regenerate your patching file by following the patch file workflow. - -## Recommendations - -1. In order to decrease the maintenance cost of the updating Code of Conduct, it is recommended to use the correct CoC version in the GitHub workflow configuration. -2. It is recommended to create a pull request for the changes made by the patching script to avoid committing changes. - Remember that, this should be dealt with an extremely delicate process due to the probability of the concerns mentioned in recommendation 3. -3. The pull requests opened by the patching script bot should be approved without issue. - Modifying the PR created from the workflow would put our code in an ambiguous state where the `CODE_OF_CONDUCT.md` file and the files that the script depend on do not match with each other. - All changes should happen in the files outlined above and resulting PRs should remain unmodified. - -[project-link]: https://github.com/pkgjs/patch-my-code-of-conduct diff --git a/conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch b/conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch deleted file mode 100644 index 0cf516142..000000000 --- a/conduct/artifacts/CODE_OF_CONDUCT_PATCH.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- preamble+template.md 2023-04-03 10:47:38 -+++ original-expected.md 2023-04-03 10:45:10 -@@ -43,7 +43,7 @@ - - --- - --# Contributor Covenant Code of Conduct -+_Contributor Covenant Code of Conduct v2.0, from [commit 8001bf8](https://github.com/EthicalSource/contributor_covenant/blob/8001bf8c6e7cd2606657e2816710770d8a79b7dc/content/version/2/0/code_of_conduct.md)_ - - ## Our Pledge - -@@ -51,7 +51,7 @@ - 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 -+nationality, personal appearance, race, religion, or sexual - identity and orientation. - - We pledge to act and interact in ways that contribute to an open, welcoming, -@@ -105,7 +105,9 @@ - - Instances of abusive, harassing, or otherwise unacceptable behavior may be - reported to the community leaders responsible for enforcement at --[INSERT CONTACT METHOD]. -+the email addresses listed above in the -+[Reporting](#report-an-issue-in-a-project) and -+[Escalation](#escalate-an-issue) sections. - All complaints will be reviewed and investigated promptly and fairly. - - All community leaders are obligated to respect the privacy and security of the -@@ -155,13 +157,13 @@ - individual, or aggression toward or disparagement of classes of individuals. - - **Consequence**: A permanent ban from any sort of public interaction within the --community. -+project 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][v2.1]. -+version 2.0, available at -+[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. - - Community Impact Guidelines were inspired by - [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. -@@ -171,7 +173,7 @@ - [https://www.contributor-covenant.org/translations][translations]. - - [homepage]: https://www.contributor-covenant.org --[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -+[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html - [Mozilla CoC]: https://github.com/mozilla/diversity - [FAQ]: https://www.contributor-covenant.org/faq - [translations]: https://www.contributor-covenant.org/translations diff --git a/conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md b/conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md deleted file mode 100644 index 727fce017..000000000 --- a/conduct/artifacts/CODE_OF_CONDUCT_PREAMBLE.md +++ /dev/null @@ -1,44 +0,0 @@ -# Code of Conduct - -The OpenJS Foundation and its member projects use [Contributor Covenant v2.0](https://contributor-covenant.org/version/2/0/code_of_conduct) as their code of conduct. The full text is included below in English, and [translations](https://www.contributor-covenant.org/translations) are available on the Contributor Covenant website. - -## Commitment - -All recipients of reports commit to: - -- maintain the confidentiality with regard to the reporter and victim of an incident -- participate in the path for escalation as outlined in the section on Escalation when required - -## Report an issue in a project - -1. To report an issue in one of the projects listed below, please use the method provided. The project itself is responsible for managing these reports. - * **AMP Project:** - * **Appium:** email maintainers - * **Electron:** - * **Express.js:** - * **Fastify:** or - * **HospitalRun:** - * **LoopBack** - * **Node.js:** - * **Node-RED:** - * **Webdriver.io:** [contact TSC reps](https://github.com/webdriverio/webdriverio/blob/HEAD/AUTHORS.md) - * **Webhint:** -2. For every other OpenJS Foundation project, please email . The Cross Project Council (CPC) is responsible for managing these reports. - - -## Report an issue in a space managed by the foundation - -For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization or an live event such as a conferences, email . The Cross Project Council (CPC) is responsible for managing these reports. - -## Escalate an issue - -The OpenJS Foundation maintains a [Code of Conduct Panel (CoCP)](https://github.com/openjs-foundation/cross-project-council/blob/HEAD/conduct/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md#code-of-conduct-panel). This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled. - -In order to escalate to the CoCP, email . - -## More Info - -For more information, refer to the full -[Code of Conduct governance document](https://github.com/openjs-foundation/cross-project-council/blob/HEAD/conduct/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md). - ----