-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #104
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,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 | ||
|
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: printf '%s\n' '--- repository guidance ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65 -maxdepth 2 -type f -print
printf '%s\n' '--- workflow diff ---'
git diff -- .github/workflows/push-email-notify.yml
printf '%s\n' '--- workflow context ---'
cat -n .github/workflows/push-email-notify.yml | sed -n '1,80p'Repository: hyperpolymath/conative-gating Length of output: 2760 🏁 Script executed: for f in \
/tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65/architecture/repo-conventions.md \
/tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65/architecture/repo-guidelines.md \
/tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65/architecture/infrastructure.md
do
printf '\n--- %s ---\n' "$f"
cat "$f"
done
printf '\n--- concurrency references in workflow files ---\n'
rg -n -C 2 'concurrency:|timeout-minutes:|push-email|notification.storm|notification storm' .github /tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65 2>/dev/nullRepository: hyperpolymath/conative-gating Length of output: 14106 🌐 Web query:
💡 Result: In GitHub Actions, concurrency control is managed using the Citations:
Add an explicit notification burst policy.
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| steps: | ||
| - name: Send push notification email | ||
| uses: dawidd6/action-send-mail@6e502825a508b867ab2954ad6343b68787624c01 # 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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- scoped repository conventions ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65 -type f -path '*/\*.md' -print
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/push-email-notify.yml
printf '%s\n' '--- relevant repository references ---'
rg -n --hidden -S 'smtp-notify-action|SMTP_PORT|secure:' .github README.md 2>/dev/null || trueRepository: hyperpolymath/conative-gating Length of output: 2776 🌐 Web query:
💡 Result: There is no GitHub Action repository named "hyperpolymath/smtp-notify-action". Research into the "hyperpolymath" GitHub organization shows that its repositories use "dawidd6/action-send-mail" to handle email notifications, rather than a custom "smtp-notify-action" repository [1][2][3]. Regarding general SMTP configuration for GitHub Actions using STARTTLS and secure ports: 1. SMTP_PORT and STARTTLS: When using common SMTP actions (like Citations:
🏁 Script executed: for f in /tmp/coderabbit-repo-knowledge/hyperpolymath-conative-gating-74c61e65/*/*.md; do
[ -f "$f" ] || continue
case "$f" in
*/conventions/*|*/learnings/*|*/architecture/*) printf '\n--- %s ---\n' "$f"; head -200 "$f";;
esac
doneRepository: hyperpolymath/conative-gating Length of output: 5817 🏁 Script executed: printf '%s\n' '--- exact action reference ---'
curl -sS -o /tmp/smtp-action-repo.json -w 'repo_http=%{http_code}\n' \
-H 'Accept: application/vnd.github+json' \
https://api.github.com/repos/hyperpolymath/smtp-notify-action
cat /tmp/smtp-action-repo.json | head -c 1000
printf '\n%s\n' '--- pinned commit lookup ---'
curl -sS -o /tmp/smtp-action-commit.json -w 'commit_http=%{http_code}\n' \
-H 'Accept: application/vnd.github+json' \
https://api.github.com/repos/hyperpolymath/smtp-notify-action/commits/1b3b752d39a4fe4c0f28f10905e4608789d3e050
cat /tmp/smtp-action-commit.json | head -c 1000
printf '\n%s\n' '--- workflow change summary and relevant diff ---'
git diff --stat
git diff -- .github/workflows/push-email-notify.yml | sed -n '1,220p'Repository: hyperpolymath/conative-gating Length of output: 2307 🏁 Script executed: python3 - <<'PY'
import base64, json, urllib.request
base='https://api.github.com/repos/hyperpolymath/smtp-notify-action/contents/'
for path in ('action.yml','README.md'):
url=base+path+'?ref=1b3b752d39a4fe4c0f28f10905e4608789d3e050'
req=urllib.request.Request(url, headers={'Accept':'application/vnd.github+json'})
try:
with urllib.request.urlopen(req) as r:
data=json.load(r)
print(f'--- {path} (http 200) ---')
print(base64.b64decode(data['content']).decode())
except Exception as e:
print(f'--- {path} ---\n{e}')
PYRepository: hyperpolymath/conative-gating Length of output: 474 🏁 Script executed: for path in action.yml README.md; do
printf '\n--- %s ---\n' "$path"
curl -k -sS -L \
-H 'Accept: application/vnd.github+json' \
"https://api.github.com/repos/hyperpolymath/smtp-notify-action/contents/$path?ref=1b3b752d39a4fe4c0f28f10905e4608789d3e050" |
jq -r 'if .content then (.content | gsub("\n";"") | `@base64d`) else .message end'
doneRepository: hyperpolymath/conative-gating Length of output: 3892 Set The action uses implicit TLS and does not support STARTTLS. If 🤖 Prompt for AI Agents |
||
| 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 | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/conative-gating
Length of output: 8403
🌐 Web query:
GitHub Actions push event branch filters deleted branch github.event.deleted head_commit null💡 Result:
When a branch is deleted in a GitHub repository, the push event is triggered for the default branch of that repository [1][2]. Because the push event is specifically tied to the repository's HEAD, the payload for this event typically contains a null value for
head_commit[3], as there is no new commit associated with the deletion itself—only the removal of a reference. Key points regarding this behavior: 1. Payload Behavior: In a push event triggered by a branch deletion, thehead_commitobject in the GitHub event payload is often null [3]. If your workflow logic relies on accessinggithub.event.head_commit, it will fail or error unless you include a safety check (e.g., checking if the object exists) [4]. 2. Filtering: GitHub Actions does not natively support branch-based filtering for thedeleteevent itself [5], nor can you easily filter out "deletion-triggered" push events using standardbranchesfilters in thepushevent trigger [1][6]. Thepushevent will still fire for the default branch when any branch is deleted [7][2]. 3. Recommended Workarounds: * Conditional Jobs/Steps: You can use anifcondition in your workflow to ignore these events. For example:if: ${{ !github.event.deleted }}[2]. This explicitly checks the boolean flagdeletedprovided in the push event payload, which is set to true when a branch is deleted [3]. * SeparatedeleteEvent: If you need to perform actions specifically when a branch is deleted (such as cleaning up infrastructure), use thedeleteevent trigger in your workflow [8][9]. Note that this event only triggers if the workflow file exists on the default branch of the repository [8]. * Filtering indeleteworkflows: Because thedeleteevent does not support native branch filtering [5], you must handle this logic within the job'sifcondition by inspectinggithub.event.reforgithub.event.ref_type[2][9]. In summary, rather than trying to filter the push event, use theif: ${{ !github.event.deleted }}condition to prevent your main push-related workflows from running during a deletion, and use a dedicated workflow with thedeleteevent trigger for any cleanup tasks you need to perform [2][8][9].Citations:
Exclude deleted branches before sending.
The
pushworkflow can run for branch deletions because GitHub emits the event on the default branch. The payload setsgithub.event.deletedtotrueandgithub.event.head_committonull, so the email can contain an emptyHead msg. 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