Skip to content

Add actions/labeler #26962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Sep 7, 2023
30 changes: 30 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
kind/docs:
- docs/**/*

kind/ui:
- web_src/**/*
- all: ["templates/**/*", "!templates/swagger/v1_json.tmpl"]

kind/api:
- templates/swagger/v1_json.tmpl

kind/build:
- Makefile
- Dockerfile
- Dockerfile.rootless
- webpack.config.js

dependencies:
- go.mod
- go.sum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a PR imports a new module, this PR gets labeled as dependencies?

Copy link
Member Author

@silverwind silverwind Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, at least that's my understanding of the label. It says "Pull requests that update a dependency file". We can of course remove the setting of this label entirely if it's not useful, but I do see the addition/modification of depdendencies a important property on a PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the dependencies now for two reasons:

  • The label does not follow the kind/ prefix
  • I don't want to go overboard with label spam

- package.json
- package-lock.json
- pyproject.toml
- poetry.lock

kind/lint:
- .eslintrc.yaml
- .golangci.yml
- .markdownlint.yaml
- .spectral.yaml
- .stylelintrc.yaml
21 changes: 21 additions & 0 deletions .github/workflows/pull-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: labeler

on:
pull_request_target:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
dot: true
sync-labels: true