Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
Single-commit orphan branch: full zed-industries/zed @ 8c74db0 source tree with a 3-file patch applied (no upstream history). Patch (crates/gpui_linux/src/linux/wayland/): - serial.rs: add SerialKind::KeyboardEnter - client.rs: store wl_keyboard.enter serial; add latest_serial_of() - window.rs: activate() uses keyboard-enter serial (Mutter focus gate) Mutter honors window activation only when the token carries the keyboard- focus serial from wl_keyboard.enter; GPUI used a stale mouse-press serial. See docs/tray-window-focus-wayland.md in logiguard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
105 lines
3.6 KiB
YAML
105 lines
3.6 KiB
YAML
name: Slack Notify First Responders
|
|
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
|
|
env:
|
|
FIRST_RESPONDER_LABELS: '["priority:P0", "priority:P1"]'
|
|
|
|
jobs:
|
|
notify-slack:
|
|
if: github.repository_owner == 'zed-industries' && github.event.issue.state == 'open'
|
|
runs-on: namespace-profile-2x4-ubuntu-2404
|
|
|
|
steps:
|
|
- name: Check if label requires first responder notification
|
|
id: check-label
|
|
env:
|
|
LABEL_NAME: ${{ github.event.label.name }}
|
|
FIRST_RESPONDER_LABELS: ${{ env.FIRST_RESPONDER_LABELS }}
|
|
run: |
|
|
if echo "$FIRST_RESPONDER_LABELS" | jq -e --arg label "$LABEL_NAME" 'index($label) != null' > /dev/null; then
|
|
echo "should_notify=true" >> "$GITHUB_OUTPUT"
|
|
echo "Label '$LABEL_NAME' requires first responder notification"
|
|
else
|
|
echo "should_notify=false" >> "$GITHUB_OUTPUT"
|
|
echo "Label '$LABEL_NAME' does not require first responder notification, skipping"
|
|
fi
|
|
|
|
- name: Build Slack message payload
|
|
if: steps.check-label.outputs.should_notify == 'true'
|
|
env:
|
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
|
LABELED_BY: ${{ github.event.sender.login }}
|
|
LABEL_NAME: ${{ github.event.label.name }}
|
|
LABELS_JSON: ${{ toJson(github.event.issue.labels.*.name) }}
|
|
run: |
|
|
LABELS=$(echo "$LABELS_JSON" | jq -r 'join(", ")')
|
|
|
|
jq -n \
|
|
--arg label_name "$LABEL_NAME" \
|
|
--arg issue_title "$ISSUE_TITLE" \
|
|
--arg issue_url "$ISSUE_URL" \
|
|
--arg labeled_by "$LABELED_BY" \
|
|
--arg labels "$LABELS" \
|
|
'{
|
|
"blocks": [
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "<!subteam^S096CPUUGLF> Issue labeled *\($label_name)*"
|
|
}
|
|
},
|
|
{
|
|
"type": "section",
|
|
"fields": [
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Issue:*\n<\($issue_url)|\($issue_title)>"
|
|
},
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Labeled by:*\n\($labeled_by)"
|
|
},
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Labels:*\n\($labels)"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}' > payload.json
|
|
|
|
echo "Payload built successfully:"
|
|
cat payload.json
|
|
|
|
- name: Send Slack notification
|
|
if: steps.check-label.outputs.should_notify == 'true'
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_FIRST_RESPONDERS }}
|
|
run: |
|
|
if [ -z "$SLACK_WEBHOOK_URL" ]; then
|
|
echo "::error::SLACK_WEBHOOK_FIRST_RESPONDERS secret is not set"
|
|
exit 1
|
|
fi
|
|
|
|
HTTP_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "$SLACK_WEBHOOK_URL" \
|
|
-H "Content-Type: application/json" \
|
|
-d @payload.json)
|
|
|
|
HTTP_BODY=$(echo "$HTTP_RESPONSE" | sed '$d')
|
|
HTTP_STATUS=$(echo "$HTTP_RESPONSE" | tail -n 1)
|
|
|
|
echo "Slack API response status: $HTTP_STATUS"
|
|
echo "Slack API response body: $HTTP_BODY"
|
|
|
|
if [ "$HTTP_STATUS" -ne 200 ]; then
|
|
echo "::error::Slack notification failed with status $HTTP_STATUS: $HTTP_BODY"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Slack notification sent successfully"
|