From 7f38bd545f47a6a722ff5dbd25ee6717ab32dcbb Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 10:32:22 +0100 Subject: [PATCH 01/10] Assets syncing: Add README.md --- assets/README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 assets/README.md diff --git a/assets/README.md b/assets/README.md new file mode 100644 index 00000000000000..8375912c960afa --- /dev/null +++ b/assets/README.md @@ -0,0 +1,5 @@ +## Gutenberg Plugin Assets + +The contents of this directory are synced to the [`assets/` directory of the Gutenberg plugin](https://plugins.trac.wordpress.org/browser/gutenberg/assets) in the WordPress.org plugin repository. This is done by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed (with the exception of this README, which is excluded from the sync). + +Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in #core-editor. From 0293815742ce536c1d975391b4f07b9ae1396466 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 10:34:58 +0100 Subject: [PATCH 02/10] Don't trigger workflow if README has changes --- .github/workflows/sync-assets-to-plugin-repo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index c841b3ffc79579..4911ed42d0e7ad 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -5,7 +5,8 @@ on: branches: - trunk paths: - - assets/** + - 'assets/**' + - '!assets/README.md' jobs: sync-assets: From d3422390d23cf88da5f933749f970609cfab9c61 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 10:40:55 +0100 Subject: [PATCH 03/10] Exclude README.md from syncing --- .github/workflows/sync-assets-to-plugin-repo.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index 4911ed42d0e7ad..0118168585768d 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -36,7 +36,9 @@ jobs: path: git - name: Copy files from git checkout to svn working copy - run: cp -R git/assets/* assets + run: | + cp -R git/assets/* assets + rm assets/README.md - name: Commit the updated assets working-directory: ./assets From 6be34029768ae0b74713fde758888fb530837a81 Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:26:10 +0100 Subject: [PATCH 04/10] Add link to `#core-editor` Slack channel Co-authored-by: Jon Surrell --- assets/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/README.md b/assets/README.md index 8375912c960afa..7bb440d4189eb2 100644 --- a/assets/README.md +++ b/assets/README.md @@ -2,4 +2,4 @@ The contents of this directory are synced to the [`assets/` directory of the Gutenberg plugin](https://plugins.trac.wordpress.org/browser/gutenberg/assets) in the WordPress.org plugin repository. This is done by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed (with the exception of this README, which is excluded from the sync). -Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in #core-editor. +Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in [#core-editor](https://wordpress.slack.com/archives/C02QB2JS7). From 4fd07e44d7be855c09ce122eb2dea099b5449e55 Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:29:57 +0100 Subject: [PATCH 05/10] Update assets/README.md Co-authored-by: Jon Surrell --- assets/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/README.md b/assets/README.md index 7bb440d4189eb2..b79554a14ba71a 100644 --- a/assets/README.md +++ b/assets/README.md @@ -1,5 +1,7 @@ ## Gutenberg Plugin Assets -The contents of this directory are synced to the [`assets/` directory of the Gutenberg plugin](https://plugins.trac.wordpress.org/browser/gutenberg/assets) in the WordPress.org plugin repository. This is done by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed (with the exception of this README, which is excluded from the sync). +This directory is managed via the [`assets/` directory in the Gutenberg repository on GitHub](https://github.com/WordPress/gutenberg/tree/trunk/assets). **Changes committed directly to the plugin repository on WordPress.org will be overwritten.** + +The contents of this directory are synced with the [`assets/` directory of the Gutenberg WordPress.org plugin repository](https://plugins.trac.wordpress.org/browser/gutenberg/assets). This is done by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed. Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in [#core-editor](https://wordpress.slack.com/archives/C02QB2JS7). From 22322b480f6951e7859a9752653d8a1615117bae Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:30:16 +0100 Subject: [PATCH 06/10] Update .github/workflows/sync-assets-to-plugin-repo.yml Co-authored-by: Jon Surrell --- .github/workflows/sync-assets-to-plugin-repo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index 0118168585768d..e18451d3e2ba75 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -38,7 +38,6 @@ jobs: - name: Copy files from git checkout to svn working copy run: | cp -R git/assets/* assets - rm assets/README.md - name: Commit the updated assets working-directory: ./assets From 1ee0a61f4b73f7dd66d6e8b4e551de69ba422c0c Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:30:45 +0100 Subject: [PATCH 07/10] Remove trigger exclusion of `assets/README.md` Co-authored-by: Jon Surrell --- .github/workflows/sync-assets-to-plugin-repo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index e18451d3e2ba75..57af6a5120d625 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -6,7 +6,6 @@ on: - trunk paths: - 'assets/**' - - '!assets/README.md' jobs: sync-assets: From 83ee29747aa318bb3a5ce9dee1bde017a92b9b51 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 12:34:56 +0100 Subject: [PATCH 08/10] Remove linebreak --- .github/workflows/sync-assets-to-plugin-repo.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index 57af6a5120d625..2dac8f2ecf76fa 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -35,8 +35,7 @@ jobs: path: git - name: Copy files from git checkout to svn working copy - run: | - cp -R git/assets/* assets + run: cp -R git/assets/* assets - name: Commit the updated assets working-directory: ./assets From 838b87ca5500b8769399787aecc5d5b7cfc88da8 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 12:35:53 +0100 Subject: [PATCH 09/10] Remove now-obsolete single quotes --- .github/workflows/sync-assets-to-plugin-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml index 2dac8f2ecf76fa..c841b3ffc79579 100644 --- a/.github/workflows/sync-assets-to-plugin-repo.yml +++ b/.github/workflows/sync-assets-to-plugin-repo.yml @@ -5,7 +5,7 @@ on: branches: - trunk paths: - - 'assets/**' + - assets/** jobs: sync-assets: From 510e4e65f5fb96d56bb27b077353e76c64f4695d Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 19 Dec 2024 13:24:47 +0100 Subject: [PATCH 10/10] Rephrase a bit --- assets/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/README.md b/assets/README.md index b79554a14ba71a..e437ec744d3807 100644 --- a/assets/README.md +++ b/assets/README.md @@ -1,7 +1,7 @@ ## Gutenberg Plugin Assets -This directory is managed via the [`assets/` directory in the Gutenberg repository on GitHub](https://github.com/WordPress/gutenberg/tree/trunk/assets). **Changes committed directly to the plugin repository on WordPress.org will be overwritten.** +The contents of this directory are synced from the [`assets/` directory in the Gutenberg repository on GitHub](https://github.com/WordPress/gutenberg/tree/trunk/assets) to the [`assets/` directory of the Gutenberg WordPress.org plugin repository](https://plugins.trac.wordpress.org/browser/gutenberg/assets). **Any changes committed directly to the plugin repository on WordPress.org will be overwritten.** -The contents of this directory are synced with the [`assets/` directory of the Gutenberg WordPress.org plugin repository](https://plugins.trac.wordpress.org/browser/gutenberg/assets). This is done by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed. +The sync is performed by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed. Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in [#core-editor](https://wordpress.slack.com/archives/C02QB2JS7).