labeler icon indicating copy to clipboard operation
labeler copied to clipboard

Labeler is not labeling PRs

Open Kitzunu opened this issue 4 years ago • 4 comments

Hey!

I am using this action on an open-source repository with these settings:



DB:
  - data/**/*.sql

CORE:
  - any: ['src/**/*.cpp', 'src/**/*.h', '!src/server/scripts/*']

Script:
  - src/server/scripts/**/*.cpp
  - src/server/scripts/**/*.h

Documentation:
  - ./*.md

Bash:
  - ./*.sh

Cmake:
  - ./*.cmake

Workflow:
  - .github/workflows/*
name: "Pull Request Labeler"
on: [pull_request]

jobs:
  triage:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/labeler@main
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
        configuration-path: .github/labeler.yml
        sync-labels: true

On the initial PR to implement this it did label on what was changed no problems, but now when I update PRs to latest master the action will run, however, it will not label anything.

Is there something in my settings that I have messed up for it to correctly label PRs?

Kitzunu avatar Oct 19 '20 12:10 Kitzunu

Okay, so I tested a few other directories and it looks like the "Workflow", "Scripts" and "DB" labels works, however, none of the ./* paths or paths inside the any will get a label on them

Kitzunu avatar Oct 21 '20 08:10 Kitzunu

Just came here, and believe my rule:

docs:
  - ./*.md
  - docs/*.md
  - docs/**/*.md

having a similar issue. Labels for things in docs/ but for instance changes to the root readme.md don't get labeled.

mgan59 avatar Oct 24 '20 13:10 mgan59

Has anyone found a fix for this?

kenbalto avatar Oct 30 '20 14:10 kenbalto

Okay I changed to two conditions as this

  - any: ['src/**/*', '!src/server/scripts/*']

Now it seems to be working as it should

Edit: Never mind still adding the label to the excluded thing

Kitzunu avatar Nov 12 '20 16:11 Kitzunu

Hello everyone! This issue has been open for a year without any activity, so I'm going to close it as stale. Please feel free to contact us if the issue is still relevant to you and we will reopen it. Thanks!

MaksimZhukov avatar Dec 12 '22 07:12 MaksimZhukov