Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

자동 레이블

자동 레이블은 triagebot.toml의 [autolabel] 설정에 따라 GitHub 이슈와 PR에 레이블을 자동으로 적용합니다.

사용법

자동 레이블은 수동으로 제어할 수 없습니다. 레이블을 수동으로 변경하는 방법은 레이블 지정을 참조하십시오.

설정

레이블에 의한 트리거

다른 레이블이 추가될 때 레이블을 추가할 수 있습니다. trigger_labels 설정 옵션은 어떤 레이블이 이를 트리거할지 지정합니다.

# Automatically applies the `I-prioritize` label whenever one of the labels
# listed below is added to an issue (unless the issue already has one of the
# labels listed in `exclude_labels`).
[autolabel."I-prioritize"]
trigger_labels = [
    "regression-untriaged",
    "regression-from-stable-to-stable",
    "regression-from-stable-to-beta",
    "regression-from-stable-to-nightly",
    "I-unsound",
]
exclude_labels = [
    "P-*",
    "T-infra",
    "T-release",
    "requires-nightly",
]

제외 레이블은 셸과 유사한 * glob 패턴을 지원합니다.

파일에 의한 트리거

PR에서 어떤 파일이 수정되었는지에 따라 레이블을 추가할 수 있습니다. trigger_files 설정 옵션은 어떤 파일이 레이블을 추가하게 할지 지정합니다. 경로는 starts_with로 매칭합니다.

# Adds the `T-compiler` label to any PR that touches `compiler` or
# `src/test/ui` unless it already has a `T-*` label.
[autolabel."T-compiler"]
trigger_files = [
    "compiler",
    "tests/ui",
]
exclude_labels = [
    "T-*",
]

새 PR에 의한 트리거

초안이 아닌 상태의 모든 PR에 레이블을 추가할 수 있으며, PR이 열릴 때 또는 이후 상태가 전환될 때 추가됩니다. PR이 더 이상 해당 조건을 충족하지 않으면 레이블이 제거됩니다.

이 기능을 활성화하려면 new_pr = true 설정 옵션을 지정하십시오. 예를 들면 다음과 같습니다.

[autolabel."S-waiting-on-review"]
new_pr = true

새 초안 PR에 의한 트리거

초안 상태의 모든 PR에 레이블을 추가할 수 있으며, PR이 열릴 때 또는 이후 상태가 전환될 때 추가됩니다. PR이 더 이상 해당 조건을 충족하지 않으면 레이블이 제거됩니다.

이 기능을 활성화하려면 new_draft = true 설정 옵션을 지정하십시오. 예를 들면 다음과 같습니다.

[autolabel."S-waiting-on-author"]
new_draft = true

새 이슈에 의한 트리거

모든 이슈에 대해 이슈가 열릴 때 레이블을 추가할 수 있습니다. 이 기능을 활성화하려면 new_issue = true 설정 옵션을 지정하십시오. 예를 들면 다음과 같습니다.

[autolabel."new-issue"]
new_issue = true

병합된 PR에 의한 트리거

모든 PR에 대해 PR이 병합될 때 레이블을 추가할 수 있습니다. 이 기능을 활성화하려면 pr_merged = true 설정 옵션을 지정하십시오. 예를 들면 다음과 같습니다.

[autolabel."needs-relnotes-triage"]
pr_merged = true

구현

src/handlers/autolabel.rs를 참조하십시오.