From c6954975980b36bd41a85ea8cf67b768d04be325 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 20 Nov 2023 11:33:14 +0100 Subject: [PATCH] Switched to `actions/labeler` for PR labeling fixes https://github.com/TryGhost/DevOps/issues/111 - this allows us to add labels based upon the contents in a smarter way than the previous workflow --- .github/labeler.yml | 7 +++++++ .github/workflows/i18n.yml | 21 --------------------- .github/workflows/labeler.yml | 11 +++++++++++ 3 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/i18n.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..cd1888e7af --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,7 @@ +'affects:i18n': + - 'ghost/i18n/**' +'affects:admin': + - 'ghost/admin/**' + - 'apps/admin-x-**' +'affects:portal': + - 'apps/portal/**' diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml deleted file mode 100644 index 9e8e243cf9..0000000000 --- a/.github/workflows/i18n.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: i18n check -on: - pull_request_target: - types: [opened] - paths: - - 'ghost/i18n/locales/**' -jobs: - create-label: - runs-on: ubuntu-latest - if: github.repository_owner == 'TryGhost' - name: Add i18n label - steps: - - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["i18n"] - }) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..33e4bf856c --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,11 @@ +name: PR labeler +on: + - pull_request_target +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4