-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,20 +3,27 @@ | |
| # PUSH_EMAIL_ENABLED=true (the single on/off switch). Addresses are pre-filled; | ||
| # sending needs the org SMTP secrets (SMTP_HOST/PORT/USER/PASS). Inherited by | ||
| # new repos from the template; placed on existing repos by the farm sweep. | ||
| # | ||
| # Re-landed after the 2026-07-20 notification-storm freeze (removed in | ||
| # 09f94c5), now on hyperpolymath/smtp-notify-action: Node-free, the SMTP | ||
| # session is Idris2-specified and machine-checked, the binary is Zig-built, | ||
| # byte-reproducible, and SHA-256-pinned inside the action itself. | ||
| name: Push email notification | ||
| on: | ||
| push: {} | ||
| push: | ||
| # Branch pushes only: tag and deletion payloads mislabel Branch:/head_commit. | ||
| branches: ['**'] | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| jobs: | ||
| notify: | ||
| name: Email on push | ||
| if: ${{ vars.PUSH_EMAIL_ENABLED == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🔵 Trivial 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-cccp-ea19f0cc -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/push-email-notify.yml
printf '%s\n' '--- relevant workflow references ---'
rg -n -C 3 'concurr|PUSH_EMAIL|push-email|notification|SMTP|timeout-minutes' .github/workflows .github 2>/dev/null || trueRepository: hyperpolymath/cccp Length of output: 26580 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- repository conventions ---'
for f in /tmp/coderabbit-repo-knowledge/hyperpolymath-cccp-ea19f0cc/*/*.md; do
[ -f "$f" ] || continue
case "$f" in
*/learnings/*|*/architecture/*) continue ;;
esac
printf '%s\n' "--- $f"
cat "$f"
done
printf '%s\n' '--- learnings and architecture for workflow scope ---'
for f in /tmp/coderabbit-repo-knowledge/hyperpolymath-cccp-ea19f0cc/learnings/*.md /tmp/coderabbit-repo-knowledge/hyperpolymath-cccp-ea19f0cc/architecture/*.md; do
[ -f "$f" ] || continue
printf '%s\n' "--- $f"
cat "$f"
doneRepository: hyperpolymath/cccp Length of output: 3801 🌐 Web query:
💡 Result: In GitHub Actions, the Citations:
Define a delivery queue for notifications. This workflow has no concurrency policy, so separate push runs can open SMTP sessions concurrently. 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| steps: | ||
| - name: Send push notification email | ||
| uses: dawidd6/action-send-mail@0bbdab096651ee93f37ec02383e088183d41ff0b # pinned | ||
| uses: hyperpolymath/smtp-notify-action@1b3b752d39a4fe4c0f28f10905e4608789d3e050 # v0.1.0 | ||
| with: | ||
| server_address: ${{ secrets.SMTP_HOST }} | ||
| server_port: ${{ secrets.SMTP_PORT }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/cccp
Length of output: 2605
🌐 Web query:
GitHub Actions push event branch filter deleted branch workflow will not run official documentation💡 Result:
Yes, the GitHub Actions push event can be triggered when a branch is deleted, and it is subject to the standard branch filters defined in your workflow [1][2]. According to official GitHub documentation, the push webhook event includes branch deletions [1]. When a branch is deleted, the workflow may trigger if the deleted branch name matches your configured branches or branches-ignore filters [3][2]. Notably, when this happens, the GITHUB_SHA and GITHUB_REF in the workflow run revert to the repository's default branch [3][2]. Because the push event triggers for deletions, users often find that workflows configured with branch filters (like those targeting specific feature branches) might inadvertently run or behave unexpectedly when those branches are deleted. To specifically handle branch deletions, GitHub recommends using the delete event rather than the push event, as it provides explicit context such as the deleted branch name in the webhook payload (via github.event.ref) [4]. If you need to prevent a workflow from running on a push event that was triggered by a deletion, you can add a conditional check in your workflow job using an expression like if: ${{!github.event.deleted }} [5].
Citations:
Exclude branch deletions explicitly.
pushworkflows can run when a deleted branch matchesbranches: ['**']. The deletion payload hashead_commit: null, so this job can send an email with an emptyHead msgfield. Addgithub.event.deleted != trueto the job condition.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 12-15: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
🤖 Prompt for AI Agents