mirror of
https://github.com/esphome/esphome.git
synced 2026-08-18 22:23:52 +08:00
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Check import esphome.__main__ time (push) Has been cancelled
CI / Test downstream esphome/device-builder (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.14) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.14) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.14) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (${{ matrix.bucket.name }}) (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run CodSpeed benchmarks (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / Test components with native ESP-IDF (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
CI for docker images / Build docker containers (docker, ubuntu-24.04) (push) Has been cancelled
CI for docker images / Build docker containers (docker, ubuntu-24.04-arm) (push) Has been cancelled
CI for docker images / Build docker containers (ha-addon, ubuntu-24.04) (push) Has been cancelled
CI for docker images / Build docker containers (ha-addon, ubuntu-24.04-arm) (push) Has been cancelled
CI - GitHub Scripts / Test auto-label-pr scripts (push) Has been cancelled
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
name: Auto Label PR
|
|
|
|
on:
|
|
# Runs only on pull_request_target due to having access to a App token.
|
|
# This means PRs from forks will not be able to alter this workflow to get the tokens
|
|
pull_request_target:
|
|
types: [labeled, opened, reopened, synchronize, edited]
|
|
|
|
# All PR/label/review writes are performed with the App token minted below,
|
|
# so the workflow's GITHUB_TOKEN only needs read access for checkout.
|
|
permissions:
|
|
contents: read # actions/checkout reads the workflow source
|
|
|
|
env:
|
|
SMALL_PR_THRESHOLD: 30
|
|
MEDIUM_PR_THRESHOLD: 100
|
|
MAX_LABELS: 15
|
|
TOO_BIG_THRESHOLD: 1000
|
|
COMPONENT_LABEL_THRESHOLD: 10
|
|
|
|
jobs:
|
|
label:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.state == 'open' && (github.event.action != 'labeled' || github.event.sender.type != 'Bot')
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
|
|
- name: Generate a token
|
|
id: generate-token
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
with:
|
|
client-id: ${{ vars.ESPHOME_GITHUB_APP_CLIENT_ID }}
|
|
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
|
# Scope the minted App token to the minimum needed by auto-label-pr/*.js.
|
|
permission-contents: read # repos.getContent for CODEOWNERS and file lookups in detectors.js
|
|
permission-issues: write # listLabelsOnIssue, addLabels, removeLabel, list/createComment
|
|
permission-pull-requests: write # pulls.listFiles, list/create/update/dismissReview
|
|
|
|
- name: Auto Label PR
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ steps.generate-token.outputs.token }}
|
|
script: |
|
|
const script = require('./.github/scripts/auto-label-pr/index.js');
|
|
await script({ github, context });
|