Skip to content

Commit

Permalink
Merge pull request #451 from Youssef1313/patch-1
Browse files Browse the repository at this point in the history
Simplify globbing examples in README
  • Loading branch information
MaksimZhukov committed Jun 1, 2023
2 parents 0776a67 + a78a6c7 commit 3cbc54c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -10,7 +10,7 @@ Automatically label new pull requests based on the paths of files being changed.

Create a `.github/labeler.yml` file with a list of labels and [minimatch](https://github.com/isaacs/minimatch) globs to match to apply the label.

The key is the name of the label in your repository that you want to add (eg: "merge conflict", "needs-updating") and the value is the path (glob) of the changed files (eg: `src/**/*`, `tests/*.spec.js`) or a match object.
The key is the name of the label in your repository that you want to add (eg: "merge conflict", "needs-updating") and the value is the path (glob) of the changed files (eg: `src/**`, `tests/*.spec.js`) or a match object.

#### Match Object

Expand Down Expand Up @@ -45,7 +45,7 @@ From a boolean logic perspective, top-level match objects are `OR`-ed together a
```yml
# Add 'label1' to any changes within 'example' folder or any subfolders
label1:
- example/**/*
- example/**

# Add 'label2' to any file changes within 'example2' folder
label2: example2/*
Expand All @@ -65,16 +65,15 @@ repo:

# Add '@domain/core' label to any change within the 'core' package
'@domain/core':
- package/core/*
- package/core/**/*
- package/core/**

# Add 'test' label to any change to *.spec.js files within the source dir
test:
- src/**/*.spec.js

# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
source:
- any: ['src/**/*', '!src/docs/*']
- any: ['src/**', '!src/docs/*']

# Add 'frontend` label to any change to *.js files as long as the `main.js` hasn't changed
frontend:
Expand Down

0 comments on commit 3cbc54c

Please sign in to comment.