diff --git a/README.md b/README.md index 88a6780a..13e7e98a 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Pull request labeler triages PRs based on the paths that are modified in the PR. -To use, 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. +To use, 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. Example: ``` @@ -16,10 +16,13 @@ label3: - example3/* - example3/**/*.yml ``` -Then create a workflow utilizing the labeler action, granting access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API: +Where `"label1"` is the name of the label on your repository that you want to add (eg: "merge conflict", "needs-updating") and `"example1/**/*"` is the path of the changed files. + + +Then create a workflow (eg: `.github/workflows/label.yml` see [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) utilizing the labeler action, granting access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API: ``` name: "Pull Request Labeler" -on: +on: - pull_request jobs: