Closed
Description
Associated GitHub Community ticket: https://github.community/t/labeler-typeerror-glob-pattern-string-required/133467
According to the README of this action, the following configurations in the label configuration file should work:
label-1:
- any: ['list', 'of', 'globs']
all: ['list', 'of', 'globs']
label-2:
- example1/*
- example2/**/*
I tested with two label configuration files in my repository (see here).
- .github/labeler-01.yml
common: - any: ['./*', './src/**'] workflow: - any: ['.github/workflows/**']
- .github/labeler-02.yml
repo: - './*' - './src/**' GHA: - '.github/**'
And my workflow looks like this (see here):
name: CI
on: pull_request
jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: PR Labeler
uses: actions/labeler@2.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler-01.yml
job2:
runs-on: ubuntu-latest
steps:
- name: PR Labeler
uses: actions/labeler@2.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler-02.yml
I changed the following files:
- ./.github/workflows/ci.yml
- ./test.txt
- ./src/test.txt
However, finally only the GHA
label was added successfully, the other three should also be added but not (see the example PR).
When using '.github/labeler-01.yml', the actions always fails with the error (see job1):
##[error]TypeError: glob pattern string required
##[error]glob pattern string required
When using '.github/labeler-02.yml', the action displays as success, but only the GHA
label is added (see job2).