Pull Request Labeler

Hello, I want to use new actions to automatically label my PRs as described here:

https://github.com/actions/labeler/blob/master/README.md

So I added https://github.com/sandreenko/coreclr/blob/master/.github/labeler.yml file with:

area-CodeGen:

  • src/jit/**/*

that in my understanding should apply area-CodeGen to all PRs that have changes in src/jit/ folder (including subfolders), 

and I created a simple PR to test that: https://github.com/sandreenko/coreclr/pull/17

but no label was applied, could somebody tell me what I am doing wrong?

Your workflow needs to be in the .github/workflows folder, see https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file for creating a new workflow.

Thanks,

 Chris

1 Like

Hi Chris, thanks for your reply.

Does it mean that https://github.com/actions/labeler/blob/master/README.md this part(Basic Examples and Common Examples) is not working? 

I did not want to utilize any machines for that.

@sandreenko wrote:

Does it mean that https://github.com/actions/labeler/blob/master/README.md this part(Basic Examples and Common Examples) is not working? 

The examples are fine, they configure the action as explained. But, you still need to add an actual workflow to your project, as described in the second half of the README. Without it, GitHub does not automagically start running the action, you need to explicitly enable the workflow.

The Labeller won’t work for any Pull Requests coming from the forked repository and this issue is discussed here.

2 Likes