mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
ci: Only link to PRs needing review if there are any (#53437)
This further reduces the noise of the compliance checks. Release Notes: - N/A
This commit is contained in:
parent
4a02367db2
commit
64c69cae9f
3 changed files with 8 additions and 8 deletions
4
.github/workflows/compliance_check.yml
vendored
4
.github/workflows/compliance_check.yml
vendored
|
|
@ -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"
|
||||
|
|
|
|||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue