From d0434720b50d551c70a8aa24713db1beeb97730b Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Wed, 8 Apr 2026 21:59:25 +0200 Subject: [PATCH] ci: Only link to PRs needing review if there are any (#53437) (cherry-pick to preview) (#53442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherrry-pick did for some reason not succeed in https://github.com/zed-industries/zed/actions/runs/24153812289/job/70487669958 despite it _having_ the proper permissions.. 😨 That's something for later, so again, another manual pick Release Notes: - N/A --- .github/workflows/compliance_check.yml | 4 ++-- .github/workflows/release.yml | 8 ++++---- tooling/xtask/src/tasks/workflows/release.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/compliance_check.yml b/.github/workflows/compliance_check.yml index c0e3000369513b8e2c05e4dcc6a8f14ea4d29dad..64e2af446016e94cc8fce28cb8f980a3cb5443c7 100644 --- a/.github/workflows/compliance_check.yml +++ b/.github/workflows/compliance_check.yml @@ -54,12 +54,12 @@ jobs: run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Scheduled compliance check passed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s" "$STATUS" "$ARTIFACT_URL") else STATUS="⚠️ Scheduled compliance check failed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") fi - MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") - curl -X POST -H 'Content-type: application/json' \ --data "$(jq -n --arg text "$MESSAGE" '{"text": $text}')" \ "$SLACK_WEBHOOK" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e21047c96bd9bd516e1013e8451c68d6fc7086b3..46acd1017154d117257dcacf1adc1dcd7f9c62fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -328,12 +328,12 @@ jobs: run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Compliance check passed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s" "$STATUS" "$ARTIFACT_URL") else STATUS="❌ Compliance check failed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") fi - MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") - curl -X POST -H 'Content-type: application/json' \ --data "$(jq -n --arg text "$MESSAGE" '{"text": $text}')" \ "$SLACK_WEBHOOK" @@ -694,12 +694,12 @@ jobs: run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Compliance check passed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s" "$STATUS" "$ARTIFACT_URL") else STATUS="❌ Compliance check failed for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") fi - MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22") - curl -X POST -H 'Content-type: application/json' \ --data "$(jq -n --arg text "$MESSAGE" '{"text": $text}')" \ "$SLACK_WEBHOOK" diff --git a/tooling/xtask/src/tasks/workflows/release.rs b/tooling/xtask/src/tasks/workflows/release.rs index 007bee86151d303b00aebeaa091240508afacf39..a49d9942e390390613f2b5b4cf36cc2766265df1 100644 --- a/tooling/xtask/src/tasks/workflows/release.rs +++ b/tooling/xtask/src/tasks/workflows/release.rs @@ -184,12 +184,12 @@ pub(crate) fn add_compliance_notification_steps( let script = formatdoc! {r#" if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="{success_prefix} for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s" "$STATUS" "$ARTIFACT_URL") else STATUS="{failure_prefix} for $COMPLIANCE_TAG" + MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "{NEEDS_REVIEW_PULLS_URL}") fi - MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "{NEEDS_REVIEW_PULLS_URL}") - curl -X POST -H 'Content-type: application/json' \ --data "$(jq -n --arg text "$MESSAGE" '{{"text": $text}}')" \ "$SLACK_WEBHOOK"