From 28bf46022aa41bb0eeebcc32ae0fee88c9696884 Mon Sep 17 00:00:00 2001
From: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Date: Thu, 23 May 2024 14:37:50 -0400
Subject: [PATCH] add simple PR auto labelling action

---
 .github/labeler.yml           | 12 ++++++++++++
 .github/workflows/labeler.yml | 14 ++++++++++++++
 2 files changed, 26 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 000000000..e8e490865
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,12 @@
+# Add Documentation tag to PR's changing markdown files, or anyhting in the docs folder
+Documentation:
+- changed-files:
+  - any-glob-to-any-file:
+  - any-glob-to-any-file:
+      - docs/*
+      - '**/*.md'
+
+# Adds Haxe tag to PR's changing haxe code files
+Haxe:
+- changed-files:
+  - any-glob-to-any-file: '**/*.hx'
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index 000000000..195b22b7c
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,14 @@
+name: "Pull Request Labeler"
+on:
+- pull_request
+
+jobs:
+  labeler:
+    permissions:
+      contents: read
+      pull-requests: write
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/labeler@v5
+      with:
+        sync-labels: true