-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #65
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
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,19 +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: | ||
| contents: read | ||
| jobs: | ||
| notify: | ||
| name: Email on push | ||
| if: ${{ vars.PUSH_EMAIL_ENABLED == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Send push notification email | ||
| uses: dawidd6/action-send-mail@0bbdab096651ee93f37ec02383e088183d41ff0b # pinned | ||
| uses: hyperpolymath/smtp-notify-action@1b3b752d39a4fe4c0f28f10905e4608789d3e050 # v0.1.0 | ||
|
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 | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- applicable repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-affinescriptiser-3c96f830 \
-maxdepth 2 -type f -name '*.md' -print
for f in /tmp/coderabbit-repo-knowledge/hyperpolymath-affinescriptiser-3c96f830/*/*.md; do
[ -f "$f" ] || continue
printf '\n--- %s ---\n' "$f"
head -80 "$f"
done
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/push-email-notify.yml
printf '%s\n' '--- pinned action metadata ---'
curl -fsSL \
https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/1b3b752d39a4fe4c0f28f10905e4608789d3e050/action.yml
printf '%s\n' '--- pinned action source candidates ---'
for path in package.json src/index.ts src/main.ts index.js dist/index.js; do
url="https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/1b3b752d39a4fe4c0f28f10905e4608789d3e050/$path"
if content=$(curl -fsSL "$url" 2>/dev/null); then
printf '\n--- %s ---\n%s\n' "$path" "$content"
fi
doneRepository: hyperpolymath/affinescriptiser Length of output: 19547 Use an SMTPS-compatible SMTP configuration. If 🤖 Prompt for AI AgentsSource: MCP tools |
||
| 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/affinescriptiser
Length of output: 4742
🌐 Web query:
site:docs.github.com GitHub Actions push event deleted branch branches filter workflow github.event.deleted💡 Result:
In GitHub Actions, the
pushevent is triggered when a branch is deleted, in addition to when commits or tags are pushed [1]. Because thepushevent encompasses deletions, a workflow configured withon: pushwill run when a branch is deleted [1]. However, there is no nativegithub.event.deletedfilter within thepushevent configuration to specifically target branch deletions in the workflow YAML syntax [2][3]. Thebranchesandbranches-ignorefilters control which branches trigger the workflow based on the branch name, not the deletion action itself [3][4]. To distinguish a branch deletion from a standard push in your workflow, you must inspect the webhook payload within a job step [1][5]. When a branch is deleted via a push-related action, the GitHub Actions payload includes adeletedboolean property [1]. You can use this in a conditional step: jobs: check-deletion: runs-on: ubuntu-latest steps: - name: Check if branch was deleted if: ${{ github.event.deleted == true }} run: echo "The branch was deleted." If you specifically wish to trigger a workflow only when a branch or tag is deleted—and not on code pushes—you should use thedeleteevent instead of thepushevent [2][6]. Thedeleteevent is designed specifically for this purpose and will run when a Git reference is deleted [6]. Note that thedeleteevent requires the workflow file to exist on the default branch to trigger [6]. Summary of Key Points: - Thepushevent triggers on branch deletion [1]. - There is no directon: push: deleted: truefilter [3]. - Use thedeleteevent if you want a dedicated trigger for deletions [6]. - Use conditional logic (if: github.event.deleted == true) if you must use thepushevent [1].Citations:
Exclude deleted branch pushes before sending mail.
The
pushevent also fires when a branch is deleted, andbranches: ['**']does not filter by deletion status. The job condition can therefore invoke the SMTP action for a deletion. 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
Source: MCP tools