From 1c03504f491507b92053c5347be1f56a0d5dfdbc Mon Sep 17 00:00:00 2001 From: Datong Sun Date: Thu, 14 Dec 2023 15:25:20 +0800 Subject: [PATCH] chore(labeler): upgrade to version 5 syntax and use the official action workflow file from `actions/labeler` (#12210) KAG-3349 --- .github/labeler.yml | 191 +++++++++++++++++++++------------- .github/workflows/label.yml | 22 ---- .github/workflows/labeler.yml | 12 +++ 3 files changed, 128 insertions(+), 97 deletions(-) delete mode 100644 .github/workflows/label.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 5b6dc2ff62b6..d75a21fa48a0 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,190 +1,231 @@ core/admin-api: -- kong/api/**/* +- changed-files: + - any-glob-to-any-file: kong/api/**/* core/balancer: -- kong/runloop/balancer/* +- changed-files: + - any-glob-to-any-file: kong/runloop/balancer/* core/cli: -- kong/cmd/**/* +- changed-files: + - any-glob-to-any-file: kong/cmd/**/* core/clustering: -- kong/clustering/**/* -- kong/cluster_events/**/* +- changed-files: + - any-glob-to-any-file: ['kong/clustering/**/*', 'kong/cluster_events/**/*'] core/configuration: -- kong/conf_loader/* +- changed-files: + - any-glob-to-any-file: kong/conf_loader/* core/db/migrations: -- kong/db/migrations/**/* +- changed-files: + - any-glob-to-any-file: kong/db/migrations/**/* core/db: -- any: ['kong/db/**/*', '!kong/db/migrations/**/*'] +- changed-files: + - all-globs-to-any-file: ['kong/db/**/*', '!kong/db/migrations/**/*'] changelog: -- CHANGELOG.md +- changed-files: + - any-glob-to-any-file: CHANGELOG.md core/docs: -- any: ['**/*.md', '!CHANGELOG.md'] +- changed-files: + - all-globs-to-any-file: ['**/*.md', '!CHANGELOG.md'] autodoc: -- 'autodoc/**/*' +- changed-files: + - any-glob-to-any-file: 'autodoc/**/*' core/language/go: -- kong/runloop/plugin_servers/* +- changed-files: + - any-glob-to-any-file: kong/runloop/plugin_servers/* core/language/js: -- kong/runloop/plugin_servers/* +- changed-files: + - any-glob-to-any-file: kong/runloop/plugin_servers/* core/language/python: -- kong/runloop/plugin_servers/* +- changed-files: + - any-glob-to-any-file: kong/runloop/plugin_servers/* core/logs: -- kong/pdk/log.lua +- changed-files: + - any-glob-to-any-file: kong/pdk/log.lua core/pdk: -- any: ['kong/pdk/**/*', '!kong/pdk/log.lua'] +- changed-files: + - all-globs-to-any-file: ['kong/pdk/**/*', '!kong/pdk/log.lua'] core/proxy: -- any: ['kong/runloop/**/*', '!kong/runloop/balancer/*', '!kong/runloop/plugin_servers/*'] +- changed-files: + - all-globs-to-any-file: ['kong/runloop/**/*', '!kong/runloop/balancer/*', '!kong/runloop/plugin_servers/*'] core/router: -- kong/router.lua +- changed-files: + - any-glob-to-any-file: kong/router/* core/templates: -- kong/templates/* +- changed-files: + - any-glob-to-any-file: kong/templates/* core/tracing: -- kong/tracing/**/* -- kong/pdk/tracing.lua +- changed-files: + - any-glob-to-any-file: ['kong/tracing/**/*', 'kong/pdk/tracing.lua'] chore: -- .github/**/* -- .devcontainer/**/* +- changed-files: + - any-glob-to-any-file: ['.github/**/*', '.devcontainer/**/*'] plugins/acl: -- kong/plugins/acl/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/acl/**/* plugins/acme: -- kong/plugins/acme/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/acme/**/* plugins/aws-lambda: -- kong/plugins/aws-lambda/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/aws-lambda/**/* plugins/azure-functions: -- kong/plugins/azure-functions/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/azure-functions/**/* plugins/basic-auth: -- kong/plugins/basic-auth/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/basic-auth/**/* plugins/bot-detection: -- kong/plugins/bot-detection/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/bot-detection/**/* plugins/correlation-id: -- kong/plugins/correlation-id/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/correlation-id/**/* plugins/cors: -- kong/plugins/cors/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/cors/**/* plugins/datadog: -- kong/plugins/datadog/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/datadog/**/* plugins/file-log: -- kong/plugins/file-log/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/file-log/**/* plugins/grpc-gateway: -- kong/plugins/grpc-gateway/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/grpc-gateway/**/* plugins/grpc-web: -- kong/plugins/grpc-web/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/grpc-web/**/* plugins/hmac-auth: -- kong/plugins/hmac-auth/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/hmac-auth/**/* plugins/http-log: -- kong/plugins/http-log/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/http-log/**/* plugins/ip-restriction: -- kong/plugins/ip-restriction/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/ip-restriction/**/* plugins/jwt: -- kong/plugins/jwt/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/jwt/**/* plugins/key-auth: -- kong/plugins/key-auth/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/key-auth/**/* plugins/ldap-auth: -- kong/plugins/ldap-auth/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/ldap-auth/**/* plugins/loggly: -- kong/plugins/loggly/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/loggly/**/* plugins/oauth2: -- kong/plugins/oauth2/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/oauth2/**/* plugins/prometheus: -- kong/plugins/prometheus/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/prometheus/**/* plugins/proxy-cache: -- kong/plugins/proxy-cache/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/proxy-cache/**/* plugins/rate-limiting: -- kong/plugins/rate-limiting/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/rate-limiting/**/* plugins/request-size-limiting: -- kong/plugins/request-size-limiting/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/request-size-limiting/**/* plugins/request-termination: -- kong/plugins/request-termination/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/request-termination/**/* plugins/request-transformer: -- kong/plugins/request-transformer/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/request-transformer/**/* plugins/response-ratelimiting: -- kong/plugins/response-ratelimiting/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/response-ratelimiting/**/* plugins/response-transformer: -- kong/plugins/response-transformer/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/response-transformer/**/* plugins/session: -- kong/plugins/session/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/session/**/* plugins/serverless-functions: -- kong/plugins/post-function/**/* -- kong/plugins/pre-function/**/* +- changed-files: + - any-glob-to-any-file: ['kong/plugins/post-function/**/*', 'kong/plugins/pre-function/**/*'] plugins/statsd: -- kong/plugins/statsd/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/statsd/**/* plugins/syslog: -- kong/plugins/syslog/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/syslog/**/* plugins/tcp-log: -- kong/plugins/tcp-log/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/tcp-log/**/* plugins/udp-log: -- kong/plugins/udp-log/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/udp-log/**/* plugins/zipkin: -- kong/plugins/zipkin/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/zipkin/**/* plugins/opentelemetry: -- kong/plugins/opentelemetry/**/* +- changed-files: + - any-glob-to-any-file: kong/plugins/opentelemetry/**/* schema-change-noteworthy: -- kong/db/schema/**/*.lua -- kong/**/schema.lua -- kong/plugins/**/daos.lua -- plugins-ee/**/daos.lua -- plugins-ee/**/schema.lua -- kong/db/dao/*.lua -- kong/enterprise_edition/redis/init.lua +- changed-files: + - any-glob-to-any-file: ['kong/db/schema/**/*.lua', 'kong/**/schema.lua', 'kong/plugins/**/daos.lua', 'plugins-ee/**/daos.lua', 'plugins-ee/**/schema.lua', 'kong/db/dao/*.lua', 'kong/enterprise_edition/redis/init.lua'] build/bazel: -- '**/*.bazel' -- '**/*.bzl' -- build/**/* -- WORKSPACE -- .bazelignore -- .bazelrc -- .bazelversion -- scripts/build-*.sh +- changed-files: + - any-glob-to-any-file: ['**/*.bazel', '**/*.bzl', 'build/**/*', 'WORKSPACE', '.bazelignore', '.bazelrc', '.bazelversion', 'scripts/build-*.sh'] diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index d23c4d403f5a..000000000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,22 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - -name: Labeler -on: [pull_request_target] - -jobs: - label: - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - uses: actions/labeler@v5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..e57cd86e2b3c --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5