From e6decfe3364efa96864897f2203a47de0e362ba6 Mon Sep 17 00:00:00 2001 From: ljstella Date: Tue, 23 Jul 2024 16:03:50 -0500 Subject: [PATCH 1/2] Adding autolabels for content --- .github/labeler.yml | 21 +++++++++++++++++++++ .github/workflows/labeler.yml | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..98a5d03fc0 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,21 @@ +Detections: +- changed-files: + - any-glob-to-any-file: + - detections/** + - dev/** + +Stories: +- changed-files: + - any-glob-to-any-file: stories/* + +Playbooks: +- changed-files: + - any-glob-to-any-file: playbooks/* + +Macros: +- changed-files: + - any-glob-to-any-file: macros/* + +Lookups: +- changed-files: + - any-glob-to-any-file: lookups/* \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..8f6a208e52 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,17 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: "splunk/security_content" + - uses: actions/labeler@v5 + with: + sync-labels: true \ No newline at end of file From 6a3c65b3e9245b37c9659a4f43d4c1dc6d6419b5 Mon Sep 17 00:00:00 2001 From: ljstella Date: Tue, 23 Jul 2024 16:17:03 -0500 Subject: [PATCH 2/2] Explicitly specify labeler config --- .github/workflows/labeler.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 8f6a208e52..d847ab278d 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,4 +14,5 @@ jobs: repository: "splunk/security_content" - uses: actions/labeler@v5 with: - sync-labels: true \ No newline at end of file + sync-labels: true + configuration-path: '.github/labeler.yml' \ No newline at end of file