From be84fb128c13f0d317f7e1d44d56b0ffae7aa7d1 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 15:58:26 +0800 Subject: [PATCH 1/3] chore: update README.md --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 34695b9..1352bbc 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ [![Release](https://img.shields.io/github/v/release/fuxingloh/multi-labeler)](https://github.com/fuxingloh/multi-labeler/releases) [![License MIT](https://img.shields.io/github/license/fuxingloh/multi-labeler)](https://github.com/fuxingloh/multi-labeler/blob/main/LICENSE) -Multi labeler for title, body, comments, commit messages, branch, base branch, author or files. Optionally, generate a -status check based on the labels. +Multi labeler for title, body, comments, commit messages, branch, base branch, author or files. +Optionally, generate a status check based on the labels. [Who is using `fuxingloh/multi-labeler`?](https://github.com/search?o=desc&q=fuxingloh+%2F+multi-labeler&s=indexed&type=Code) @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: # follows semantic versioning. Lock to different version: v1, v1.5, v1.5.0 or use a commit hash. - - uses: fuxingloh/multi-labeler@v2 # v2 + - uses: fuxingloh/multi-labeler@v4 # v4 with: github-token: ${{secrets.GITHUB_TOKEN}} # optional, default to '${{ github.token }}' config-path: .github/labeler.yml # optional, default to '.github/labeler.yml' @@ -139,7 +139,7 @@ jobs: name: Labeler runs-on: ubuntu-latest steps: - - uses: fuxingloh/multi-labeler@v1 + - uses: fuxingloh/multi-labeler@v4 ``` #### `.github/labeler.yml` @@ -200,7 +200,7 @@ jobs: name: Labeler runs-on: ubuntu-latest steps: - - uses: fuxingloh/multi-labeler@v1 + - uses: fuxingloh/multi-labeler@v4 ``` #### `.github/labeler.yml` @@ -243,7 +243,7 @@ jobs: name: Labeler runs-on: ubuntu-latest steps: - - uses: fuxingloh/multi-labeler@v1 + - uses: fuxingloh/multi-labeler@v4 ``` #### `.github/labeler.yml` @@ -274,7 +274,7 @@ jobs: name: Labeler runs-on: ubuntu-latest steps: - - uses: fuxingloh/multi-labeler@v1 + - uses: fuxingloh/multi-labeler@v4 ``` #### `.github/labeler.yml` @@ -296,11 +296,12 @@ labels: ## Configuration -Once you’ve added multi-labeler to your repository, it must be enabled by adding a `.github/labeler.yml` configuration -file to the repository. If you want to use a configuration file shared across multiple repositories, you can set the -`config-repo` input to point to a different repository. However, make sure to set a `github-token` that has permissions -to access the provided repository, as the default `GITHUB_TOKEN` only has access to the repository the action is -running in. +Once you’ve added fuxingloh/multi-labeler to your repository, +it must be enabled by adding a `.github/labeler.yml` configuration file to the repository. +If you want to use a configuration file shared across multiple repositories, +you can set the`config-repo` input to point to a different repository. +However, make sure to set a `github-token` that has permissions to access the provided repository, +as the default `GITHUB_TOKEN` only has access to the repository the action is running in. ## Matchers @@ -395,8 +396,9 @@ labels: ### PR Files: [Glob Matcher](https://github.com/isaacs/minimatch) -Maximum of 3000 files only. If you use this to audit changes, take note of the 3000 files limitation. Matcher within -files are 'and condition', all must match. +Maximum of 3000 files only. +If you use this to audit changes, take note of the 3000 files limitation. +Matchers within files are 'and condition'; all must match. #### PR Files Basic @@ -517,9 +519,9 @@ checks: ## Why? -> There are so many labeler why create another? 😧 +> There are so many labelers why create another? 😧 -1. I want a lightweight labeler that is written in TypeScript so that it don't have to build a docker image everytime it runs. +1. I want a lightweight labeler written in TypeScript so that it doesn't have to build a docker image every time it runs. 2. I want a simple match first append based multi-labeler without it being a turing complete solution. 3. I want to write my rules with `.github/labeler.yml` for a single source of label truth. 4. I don't want it to do anything else, labels only. From 34db78bf28d2733a92660330af4f7f880d3fb427 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 16:00:53 +0800 Subject: [PATCH 2/3] add new bump(deps): labeler --- .github/labeler.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8ea35d0..1cbe1a9 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -23,6 +23,10 @@ labels: branch: '^chore/.*' commits: "^chore(\\((deps|ci)\\))?:.*" + - label: 'chore' + matcher: + title: "^bump(\\((deps|ci)\\))?:.*" + - label: 'docs' matcher: title: '^docs:.*' From af6a3d0f7a695e8ed8c526c7e1ed8f658a27bd49 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 16:02:48 +0800 Subject: [PATCH 3/3] format --- .github/dependabot.yml | 23 ----------------------- .github/labeler.yml | 2 ++ README.md | 6 +++--- 3 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index b4834bd..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -updates: - - package-ecosystem: 'npm' - directory: '/' - schedule: - interval: 'monthly' - ignore: - - dependency-name: '@types/*' - - dependency-name: 'eslint' - - dependency-name: 'eslint-*' - - dependency-name: 'typescript' - - dependency-name: 'jest' - - dependency-name: 'jest-*' - versioning-strategy: 'increase' - commit-message: - prefix: 'chore(deps): ' - - - package-ecosystem: 'github-actions' - directory: '/' - schedule: - interval: 'monthly' - commit-message: - prefix: 'chore(deps): ' diff --git a/.github/labeler.yml b/.github/labeler.yml index 1cbe1a9..f8eaea2 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -6,11 +6,13 @@ labels: title: '^feat:.*' branch: '^feat/.*' commits: '^feat:.*' + - label: dependabot matcher: title: '^chore(deps).*' branch: '^dependabot/.*' commits: '^chore(deps).*' + - label: 'fix' matcher: title: '^fix:.*' diff --git a/README.md b/README.md index 1352bbc..e1fb708 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License MIT](https://img.shields.io/github/license/fuxingloh/multi-labeler)](https://github.com/fuxingloh/multi-labeler/blob/main/LICENSE) Multi labeler for title, body, comments, commit messages, branch, base branch, author or files. -Optionally, generate a status check based on the labels. +Optionally, generate a status check based on the labels. [Who is using `fuxingloh/multi-labeler`?](https://github.com/search?o=desc&q=fuxingloh+%2F+multi-labeler&s=indexed&type=Code) @@ -301,7 +301,7 @@ it must be enabled by adding a `.github/labeler.yml` configuration file to the r If you want to use a configuration file shared across multiple repositories, you can set the`config-repo` input to point to a different repository. However, make sure to set a `github-token` that has permissions to access the provided repository, -as the default `GITHUB_TOKEN` only has access to the repository the action is running in. +as the default `GITHUB_TOKEN` only has access to the repository the action is running in. ## Matchers @@ -398,7 +398,7 @@ labels: Maximum of 3000 files only. If you use this to audit changes, take note of the 3000 files limitation. -Matchers within files are 'and condition'; all must match. +Matchers within files are 'and condition'; all must match. #### PR Files Basic