From b78dba3eb519d92321a5a7743242197afca7e00a Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 23 Oct 2022 04:53:56 +0200 Subject: [PATCH 1/2] Simplify globbing examples in README --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5bfe8c92e..c9bad0605 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,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 @@ -52,7 +52,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/* @@ -67,8 +67,7 @@ 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: @@ -76,7 +75,7 @@ test: # 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: From a78a6c7eb7714f46ddda8e1f2c243abd28ce713d Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 31 May 2023 19:27:34 +0300 Subject: [PATCH 2/2] Update README.md Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7788b585a..52fcd7a4f 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ repo: - '*' # Add '@domain/core' label to any change within the 'core' package -@domain/core: +'@domain/core': - package/core/** # Add 'test' label to any change to *.spec.js files within the source dir