From 96fc2b4efb22d7870cdfeed13159c2dbf746b1d5 Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sun, 22 Sep 2024 13:59:28 +0200 Subject: [PATCH 1/2] Add labeler workflow for Linux issues --- .github/workflows/labeler.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 00000000..fbb70160 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,24 @@ +name: Labeler + +on: + issues: + types: [opened, edited] + +jobs: + label-linux: + runs-on: ubuntu-latest + steps: + - name: Add Linux label + if: | + contains(toLower(github.event.issue.title), 'linux') || + contains(toLower(github.event.issue.body), 'linux') || + contains(toLower(github.event.issue.title), 'ubuntu') || + contains(toLower(github.event.issue.body), 'ubuntu') || + contains(toLower(github.event.issue.title), 'arch') || + contains(toLower(github.event.issue.body), 'arch') || + contains(toLower(github.event.issue.title), 'kde') || + contains(toLower(github.event.issue.body), 'kde') + uses: actions-ecosystem/action-add-labels@v1 + with: + github_token: ${{ secrets.GH_TOKEN }} + labels: linux From ea320c0e0836cd66119cb09c47471c45c7a322f9 Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sun, 22 Sep 2024 14:02:47 +0200 Subject: [PATCH 2/2] remove lowerCase --- .github/workflows/labeler.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index fbb70160..6046ca9e 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -10,14 +10,14 @@ jobs: steps: - name: Add Linux label if: | - contains(toLower(github.event.issue.title), 'linux') || - contains(toLower(github.event.issue.body), 'linux') || - contains(toLower(github.event.issue.title), 'ubuntu') || - contains(toLower(github.event.issue.body), 'ubuntu') || - contains(toLower(github.event.issue.title), 'arch') || - contains(toLower(github.event.issue.body), 'arch') || - contains(toLower(github.event.issue.title), 'kde') || - contains(toLower(github.event.issue.body), 'kde') + contains(github.event.issue.title, 'linux') || + contains(github.event.issue.body, 'linux') || + contains(github.event.issue.title, 'ubuntu') || + contains(github.event.issue.body, 'ubuntu') || + contains(github.event.issue.title, 'arch') || + contains(github.event.issue.body, 'arch') || + contains(github.event.issue.title, 'kde') || + contains(github.event.issue.body, 'kde') uses: actions-ecosystem/action-add-labels@v1 with: github_token: ${{ secrets.GH_TOKEN }}