From 9f93e554e658563ad707e1fa2b84b5ce29308d9b Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 15 Oct 2020 23:13:36 +0200 Subject: [PATCH] feat(Actions): Automatically add labels on PRs (#3571) --- .github/label-pr.yml | 14 ++++++++++++++ .github/workflows/labeler.yml | 16 ++++++++++++++++ src/server/scripts/World/character_creation.cpp | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/label-pr.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/label-pr.yml b/.github/label-pr.yml new file mode 100644 index 000000000..24b88df6b --- /dev/null +++ b/.github/label-pr.yml @@ -0,0 +1,14 @@ +- regExp: ".*\\.sql+$" + labels: ["DB"] +- regExp: ".*\\.(cpp|h)+$" + labels: ["CORE"] +- regExp: "src/server/scripts/(.*).(cpp|h)+$" + labels: ["Script"] +- regExp: ".*\\.md+$" + labels: ["Documentation"] +- regExp: ".*\\.sh+$" + labels: ["Bash"] +- regExp: ".*\\.cmake+$" + labels: ["Cmake"] +- regExp: ".*\\.yml+$" + labels: ["Workflow"] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..202528c73 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,16 @@ +# Workflow to associate labels automatically +name: labeler +# Trigger the workflow on pull request events +on: [pull_request] +jobs: + label: + runs-on: ubuntu-20.04 + steps: + # We need to checkout the repository to access the configured file (.github/label-pr.yml) + - uses: actions/checkout@v2 + - name: Labeler + uses: docker://decathlon/pull-request-labeler-action:2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml` + CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml diff --git a/src/server/scripts/World/character_creation.cpp b/src/server/scripts/World/character_creation.cpp index 986f1ac8c..11ea51aa0 100644 --- a/src/server/scripts/World/character_creation.cpp +++ b/src/server/scripts/World/character_creation.cpp @@ -53,4 +53,4 @@ public: void AddSC_character_creation() { new CharacterCreationProcedures(); -} \ No newline at end of file +}