From fc4c584e0c3fbe36489c687b38c78dff6029b9fe Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 2 Dec 2024 16:23:42 +0100 Subject: [PATCH] Repo Gardening: handle External Media extension (#40408) This should allow automatically labeling PRs like #40382 --- .../changelog/update-repo-gardening-label-external-meida | 4 ++++ .../repo-gardening/src/tasks/add-labels/index.js | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 projects/github-actions/repo-gardening/changelog/update-repo-gardening-label-external-meida diff --git a/projects/github-actions/repo-gardening/changelog/update-repo-gardening-label-external-meida b/projects/github-actions/repo-gardening/changelog/update-repo-gardening-label-external-meida new file mode 100644 index 0000000000000..a1d83b7301937 --- /dev/null +++ b/projects/github-actions/repo-gardening/changelog/update-repo-gardening-label-external-meida @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Labeling: automatically label changes to the External Media extension. diff --git a/projects/github-actions/repo-gardening/src/tasks/add-labels/index.js b/projects/github-actions/repo-gardening/src/tasks/add-labels/index.js index 94bf5aa0f7fab..30a95cbbb4357 100644 --- a/projects/github-actions/repo-gardening/src/tasks/add-labels/index.js +++ b/projects/github-actions/repo-gardening/src/tasks/add-labels/index.js @@ -218,6 +218,14 @@ async function getLabelsToAdd( octokit, owner, repo, number, isDraft, isRevert ) } } + // External Media extension. + const externalMedia = file.match( + /^projects\/plugins\/jetpack\/extensions\/shared\/external-media\// + ); + if ( externalMedia !== null ) { + keywords.add( '[Extension] External Media' ); + } + // React Dashboard and Boost Admin. const reactAdmin = file.match( /^(projects\/plugins\/(crm|boost\/app)\/admin|projects\/plugins\/jetpack\/_inc\/client)\//