-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #31
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,20 +3,43 @@ | |
| # 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: ['**'] | ||
| concurrency: | ||
| # Deliberately per-RUN, so no run is ever queued behind another and none is | ||
| # ever cancelled. Do NOT "tidy" this into a shared group such as | ||
| # ${{ github.workflow }}-${{ github.ref }}. GitHub's workflow-syntax docs: | ||
| # "By default, any existing pending job or workflow in the same concurrency | ||
| # group will be canceled and the new queued job or workflow will take its | ||
| # place." That happens regardless of cancel-in-progress, which governs only | ||
| # the RUNNING job. On this workflow it silently loses a notification email, | ||
| # with no error anywhere. Every run here reports a DISTINCT commit, so there | ||
| # is no redundant work for a concurrency limit to remove. | ||
| # The docs also offer `queue: max` (up to 100 pending); not used, because 100 | ||
| # is still a cap whereas a per-run group needs none. | ||
| # Verified with zizmor 1.30.0: deleting this block raises concurrency-limits; | ||
| # this form silences it exactly as a shared group would. | ||
| group: push-email-${{ github.run_id }} | ||
| cancel-in-progress: false | ||
| permissions: | ||
| actions: read | ||
| 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@ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7 # v0.2.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' '--- workflow ---'
sed -n '1,90p' .github/workflows/push-email-notify.yml
printf '%s\n' '--- action references and SMTP settings ---'
rg -n -C 3 'smtp-notify-action|action-send-mail|SMTP_PORT|secure|STARTTLS|starttls' .github
printf '%s\n' '--- pinned action metadata (if available locally) ---'
git ls-tree -r --name-only HEAD | rg '(^|/)(action\.yml|action\.yaml)$' || trueRepository: hyperpolymath/launch-scaffolder Length of output: 4749 🏁 Script executed: #!/bin/bash
set -eu
sha='ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7'
base="https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/$sha"
for file in action.yml README.md; do
printf '\n--- %s ---\n' "$file"
curl --fail --silent --show-error "$base/$file" | sed -n '1,220p'
done
printf '\n--- repository tree at pinned commit ---\n'
curl --fail --silent --show-error \
"https://api.github.com/repos/hyperpolymath/smtp-notify-action/git/trees/$sha?recursive=1" |
jq -r '.tree[] | select(.type == "blob") | .path' | sed -n '1,160p'Repository: hyperpolymath/launch-scaffolder Length of output: 6313 Use a compatible SMTP transport before merging. 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/launch-scaffolder
Length of output: 4155
🌐 Web query:
GitHub Actions push event branch deletion deleted true head_commit null branches filter workflow syntax💡 Result:
When a branch is deleted in a GitHub repository, it generates a push event where the payload property "deleted" is set to "true" [1][2]. In this specific scenario, the "head_commit" object in the push event payload will be null because there is no head commit associated with a deleted reference [1][2]. Workflow behavior and considerations: 1. Workflow Triggers: While the push event includes information about branch deletions, using the "delete" event is the dedicated way to trigger workflows specifically for branch or tag deletions [3][1]. Note that for the "delete" event to trigger, the workflow file must exist on the repository's default branch [3][4]. 2. Payload Data: If you use the push event to handle deletions, you must handle the case where "head_commit" is null. Because the push event payload for a deletion does not contain the usual commit details, you cannot rely on "head_commit" to access information about the branch that was just deleted [3][1]. 3. Branches Filter: When using the "push" event, the "branches" or "branches-ignore" filters are evaluated against the Git reference name (e.g., "refs/heads/feature-branch") [5][6]. If you configure a workflow to trigger on the "push" event and use branch filters, the workflow will still be evaluated when a branch is deleted if that deletion constitutes a "push" event to your repository [1][5]. If your goal is to perform cleanup tasks after a branch deletion, it is often more robust to use the "delete" event, which provides the deleted reference name directly via "${{ github.event.ref }}" [3][7]. If you must use the "push" event, ensure your logic explicitly checks if "deleted" is true to avoid errors caused by the null "head_commit" [1][2].
Citations:
Exclude branch-deletion push events.
branches: ['**']does not exclude branch-deletionpushevents. These events can setgithub.event.head_committonull, so the notification can omit the head message. Addgithub.event.deleted != trueto the job condition, or handle deletion events explicitly.🤖 Prompt for AI Agents