Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions VKUI/auto-label-pull-request/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# auto-label-pull-request

Автоматически определяет и добавляет labels в pull request.

## Inputs

- `token` - GitHub token с правами на чтение/запись PR labels.
- `pr-number` - номер PR

## Что делает

- Получает измененные файлы PR через GitHub API.
- Генерирует labels по путям:
- `cmp:*`, `hook:*`, `docs`, `dependencies`, `github_actions`
- `subpackage:@vkontakte/vkui-codemods`, `subpackage:@vkontakte/vkui-floating-ui`
- Добавляет бизнес-лейблы:
- `ci:cherry-pick:patch`, если заголовок PR начинается с `fix`
- `vkui-tokens`, если автор `dependabot[bot]` и заголовок содержит `@vkontakte/vkui-tokens`
- Фильтрует несуществующие labels в репозитории.
- Добавляет итоговый список labels в PR.

## Пример использования

```yaml
- id: auto-labels
uses: ./VKUI/auto-label-pull-request
with:
token: ${{ secrets.GITHUB_TOKEN }}
Comment thread
SevereCloud marked this conversation as resolved.
pull_request_number: ${{ github.event.pull_request.number }}
```
12 changes: 12 additions & 0 deletions VKUI/auto-label-pull-request/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Auto Label Pull Request'
description: 'Detect and add pull request labels automatically'
inputs:
pull_request_number:
required: true
description: 'Pull request number'
token:
required: true
description: 'GitHub token with pull request write access'
runs:
using: 'node24'
main: 'dist/index.js'
Loading
Loading