From 3d952ab8a021e28c7843bd6b53ec037ec5b3320d Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Mon, 11 Mar 2024 21:34:10 +0100 Subject: [PATCH 1/5] update to labeler v5, improve config --- .github/labeler.yml | 93 +++++++++++++++++++++++------- .github/workflows/pull-labeler.yml | 5 +- 2 files changed, 75 insertions(+), 23 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8a5ab26975ea..277f11f40f96 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,36 +1,87 @@ modifies/docs: - - "**/*.md" - - "docs/**" + - changed-files: + - any-glob-to-any-file: + - "**/*.md" + - "docs/**" modifies/frontend: - - "web_src/**/*" + - changed-files: + - any-glob-to-any-file: + - "web_src/**" + - "tailwind.config.js" + - "webpack.config.js" modifies/templates: - - all: ["templates/**", "!templates/swagger/v1_json.tmpl"] + - changed-files: + - all-globs-to-any-file: + - "templates/**" + - "!templates/swagger/v1_json.tmpl" modifies/api: - - "routers/api/**" - - "templates/swagger/v1_json.tmpl" + - changed-files: + - any-glob-to-any-file: + - "routers/api/**" + - "templates/swagger/v1_json.tmpl" modifies/cli: - - "cmd/**" + - changed-files: + - any-glob-to-any-file: ["cmd/**"] modifies/translation: - - "options/locale/*.ini" + - changed-files: + - any-glob-to-any-file: ["options/locale/*.ini"] modifies/migrations: - - "models/migrations/**/*" + - changed-files: + - any-glob-to-any-file: ["models/migrations/**"] modifies/internal: - - "Makefile" - - "Dockerfile" - - "Dockerfile.rootless" - - "docker/**" - - "webpack.config.js" - - ".eslintrc.yaml" - - ".golangci.yml" - - ".markdownlint.yaml" - - ".spectral.yaml" - - ".stylelintrc.yaml" - - ".yamllint.yaml" - - ".github/**" + - changed-files: + - any-glob-to-any-file: + - ".air.toml" + - "Makefile" + - "Dockerfile" + - "Dockerfile.rootless" + - ".dockerignore" + - "docker/**" + - ".editorconfig" + - ".eslintrc.yaml" + - ".golangci.yml" + - ".gitpod.yml" + - ".markdownlint.yaml" + - ".spectral.yaml" + - ".stylelintrc.yaml" + - ".yamllint.yaml" + - ".github/**" + - ".gitea/" + - ".devcontainer/**" + - "build.go" + - "build/**" + - "contrib/**" + +modifies/dependencies: + - changed-files: + - any-glob-to-any-file: + - "package.json" + - "package-lock.json" + - "poetry.toml" + - "poetry.lock" + - "go.mod" + - "go.sum" + - "pyproject.toml" + +go: + - changed-files: + - any-glob-to-any-file: ["**/*.go"] + +javascript: + - changed-files: + - any-glob-to-any-file: ["**/*.js"] + +changelog: + - changed-files: + - any-glob-to-any-file: + - "custom/app.example.ini" + - "docs/content/administration/config-cheat-sheet.en-us.md" + - "docs/content/administration/config-cheat-sheet.zh-cn.md" + diff --git a/.github/workflows/pull-labeler.yml b/.github/workflows/pull-labeler.yml index edd2f6d16e63..b9b712bc4cfe 100644 --- a/.github/workflows/pull-labeler.yml +++ b/.github/workflows/pull-labeler.yml @@ -9,12 +9,13 @@ concurrency: cancel-in-progress: true jobs: - label: + labeler: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: dot: true + sync-labels: true From 4ff9d7b006eb0394ee22ad27aef10f9f09007953 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Mon, 11 Mar 2024 21:43:47 +0100 Subject: [PATCH 2/5] fix yaml lint --- .github/labeler.yml | 103 ++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 277f11f40f96..e0fd9bc96fe6 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,87 +1,86 @@ modifies/docs: - changed-files: - - any-glob-to-any-file: - - "**/*.md" - - "docs/**" + - any-glob-to-any-file: + - "**/*.md" + - "docs/**" modifies/frontend: - changed-files: - - any-glob-to-any-file: - - "web_src/**" - - "tailwind.config.js" - - "webpack.config.js" + - any-glob-to-any-file: + - "web_src/**" + - "tailwind.config.js" + - "webpack.config.js" modifies/templates: - changed-files: - - all-globs-to-any-file: - - "templates/**" - - "!templates/swagger/v1_json.tmpl" + - all-globs-to-any-file: + - "templates/**" + - "!templates/swagger/v1_json.tmpl" modifies/api: - changed-files: - - any-glob-to-any-file: - - "routers/api/**" - - "templates/swagger/v1_json.tmpl" + - any-glob-to-any-file: + - "routers/api/**" + - "templates/swagger/v1_json.tmpl" modifies/cli: - changed-files: - - any-glob-to-any-file: ["cmd/**"] + - any-glob-to-any-file: ["cmd/**"] modifies/translation: - changed-files: - - any-glob-to-any-file: ["options/locale/*.ini"] + - any-glob-to-any-file: ["options/locale/*.ini"] modifies/migrations: - changed-files: - - any-glob-to-any-file: ["models/migrations/**"] + - any-glob-to-any-file: ["models/migrations/**"] modifies/internal: - changed-files: - - any-glob-to-any-file: - - ".air.toml" - - "Makefile" - - "Dockerfile" - - "Dockerfile.rootless" - - ".dockerignore" - - "docker/**" - - ".editorconfig" - - ".eslintrc.yaml" - - ".golangci.yml" - - ".gitpod.yml" - - ".markdownlint.yaml" - - ".spectral.yaml" - - ".stylelintrc.yaml" - - ".yamllint.yaml" - - ".github/**" - - ".gitea/" - - ".devcontainer/**" - - "build.go" - - "build/**" - - "contrib/**" + - any-glob-to-any-file: + - ".air.toml" + - "Makefile" + - "Dockerfile" + - "Dockerfile.rootless" + - ".dockerignore" + - "docker/**" + - ".editorconfig" + - ".eslintrc.yaml" + - ".golangci.yml" + - ".gitpod.yml" + - ".markdownlint.yaml" + - ".spectral.yaml" + - ".stylelintrc.yaml" + - ".yamllint.yaml" + - ".github/**" + - ".gitea/" + - ".devcontainer/**" + - "build.go" + - "build/**" + - "contrib/**" modifies/dependencies: - changed-files: - - any-glob-to-any-file: - - "package.json" - - "package-lock.json" - - "poetry.toml" - - "poetry.lock" - - "go.mod" - - "go.sum" - - "pyproject.toml" + - any-glob-to-any-file: + - "package.json" + - "package-lock.json" + - "poetry.toml" + - "poetry.lock" + - "go.mod" + - "go.sum" + - "pyproject.toml" go: - changed-files: - - any-glob-to-any-file: ["**/*.go"] + - any-glob-to-any-file: ["**/*.go"] javascript: - changed-files: - - any-glob-to-any-file: ["**/*.js"] + - any-glob-to-any-file: ["**/*.js"] changelog: - changed-files: - - any-glob-to-any-file: - - "custom/app.example.ini" - - "docs/content/administration/config-cheat-sheet.en-us.md" - - "docs/content/administration/config-cheat-sheet.zh-cn.md" - + - any-glob-to-any-file: + - "custom/app.example.ini" + - "docs/content/administration/config-cheat-sheet.en-us.md" + - "docs/content/administration/config-cheat-sheet.zh-cn.md" From ba9cb8448b424ce52e04da846b47ab2de644c931 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Tue, 12 Mar 2024 07:25:29 +0100 Subject: [PATCH 3/5] remove dot --- .github/workflows/pull-labeler.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull-labeler.yml b/.github/workflows/pull-labeler.yml index b9b712bc4cfe..812819b5991e 100644 --- a/.github/workflows/pull-labeler.yml +++ b/.github/workflows/pull-labeler.yml @@ -17,5 +17,4 @@ jobs: steps: - uses: actions/labeler@v5 with: - dot: true sync-labels: true From c0126c6a25f99d2fe94e7b07b72521743c95edc3 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Tue, 12 Mar 2024 19:17:18 +0100 Subject: [PATCH 4/5] use multiline syntax --- .github/labeler.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index e0fd9bc96fe6..4da02578cfeb 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -25,15 +25,18 @@ modifies/api: modifies/cli: - changed-files: - - any-glob-to-any-file: ["cmd/**"] + - any-glob-to-any-file: + - "cmd/**" modifies/translation: - changed-files: - - any-glob-to-any-file: ["options/locale/*.ini"] + - any-glob-to-any-file: + - "options/locale/*.ini" modifies/migrations: - changed-files: - - any-glob-to-any-file: ["models/migrations/**"] + - any-glob-to-any-file: + - "models/migrations/**" modifies/internal: - changed-files: @@ -72,11 +75,13 @@ modifies/dependencies: go: - changed-files: - - any-glob-to-any-file: ["**/*.go"] + - any-glob-to-any-file: + - "**/*.go" javascript: - changed-files: - - any-glob-to-any-file: ["**/*.js"] + - any-glob-to-any-file: + - "**/*.js" changelog: - changed-files: From cea0610a51ade767271dea4d85a6d8059e536c65 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Tue, 12 Mar 2024 19:41:52 +0100 Subject: [PATCH 5/5] rename labels; remove changelog for now --- .github/labeler.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 4da02578cfeb..a1209c77b8c5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -73,19 +73,12 @@ modifies/dependencies: - "go.sum" - "pyproject.toml" -go: +modifies/go: - changed-files: - any-glob-to-any-file: - "**/*.go" -javascript: +modifies/js: - changed-files: - any-glob-to-any-file: - "**/*.js" - -changelog: - - changed-files: - - any-glob-to-any-file: - - "custom/app.example.ini" - - "docs/content/administration/config-cheat-sheet.en-us.md" - - "docs/content/administration/config-cheat-sheet.zh-cn.md"