diff --git a/.github/workflows/compliance_check.yml b/.github/workflows/compliance_check.yml index 4425032a44d0516b79685580cdab93e6f673a3db..ac94d431ca2938fc512e8a480dd7ad46abe1041d 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 bdd1205bf8cbcbb3afaf88a3342afe5df3cda7bd..1001081ae4b6abcd169a45b8b1192892617139af 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 ea9542ea56b86bfceb2bd1097b20e9bf93e941f2..be49ef7d7e7c552e3b52b350cbaab47c988ec39f 100644 --- a/tooling/xtask/src/tasks/workflows/release.rs +++ b/tooling/xtask/src/tasks/workflows/release.rs @@ -185,12 +185,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"