Zulip 알림
Triagebot은 이슈 레이블 같은 다양한 트리거에 기반하여 Zulip으로 메시지를 보낼 수 있습니다.
사용법
Zulip 알림은 아래에 설명된 설정에 따라 자동화되어 있습니다. 라벨의 추가나 제거, 또는 이슈가 닫히거나 다시 열릴 때 트리거될 수 있습니다.
예를 들어, rust-lang/rust 저장소는 이슈에 A-edition-2021 레이블이 지정될 때마다 “Edition 2021” 스트림에 자동으로 메시지를 게시하도록 구성되어 있으며, 에디션과 관련된 이 알림은 대략 다음과 같은 모습입니다:
triagebot
이슈 #109298 “ICE
Subslice unexpected because it isn't captured–edition=2021“이 추가되었습니다.
설정
이 기능은 triagebot.toml에 [notify-zulip] 테이블을 두어 저장소에서 활성화합니다.
일부 메시지는 치환을 지원합니다.
{number}는 이슈/PR 번호로 대체됩니다.{title}은 이슈/PR 제목으로 대체됩니다.{recipients}는 이슈/PR에 관련된 사람들(작성자와 담당자)의 멘션 목록으로 대체됩니다.
# Triggers a Zulip notification based on the given label name.
[notify-zulip."label-name"]
# The Zulip stream to post to.
# Can be found by looking for the first number in URLs, e.g. https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler
zulip_stream = 245100 # #t-compiler/prioritization/alerts
# The Zulip topic to post to.
# Supports {number} and {title} substitution.
topic = "#{number} {title}"
# Optional message to be posted on GitHub when opening the Zulip topic.
# Useful to add a backlink from GitHub to the Zulip topic.
# Supports {zulip_topic_url} substitution.
github_comment = "[Zulip topic]({zulip_topic_url}) was opened to discuss this issue."
# The message to post when the label is added.
# Supports {number}, {title}, and {recipients} substitution.
message_on_add = "Issue #{number} \"{title}\" has been added."
# The message to post when the label is removed.
# Supports {number}, {title}, and {recipients} substitution.
message_on_remove = "Issue #{number}'s nomination has been removed. Thanks all for participating!"
# The message to post when the issue/PR is closed and it has the label.
# Supports {number}, {title}, and {recipients} substitution.
message_on_close = "Issue #{number} has been closed. Thanks for participating!"
# The message to post when the issue/PR is reopened and it has the label.
# Supports {number}, {title}, and {recipients} substitution.
message_on_reopen = "Issue #{number} has been reopened. Pinging @*T-types*."
# The Zulip notification will not be posted unless the issue/PR has all of these labels.
# Please replace the `{team}` placeholder with the appropriate team to be notified for the nomination
# (ex. `I-compiler-nominated`, `I-lang-nominated`, ...)
required_labels = ["I-{team}-nominated"]
구현
src/handlers/notify_zulip.rs를 참고하십시오.