Repository navigation
chore(ci): repoint push-email-notify to smtp-notify-action #40
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 |
|---|---|---|
|
|
@@ -4,19 +4,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: | ||
| 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@v3.12.0 | ||
| uses: hyperpolymath/smtp-notify-action@v0.2.0 # NOSONAR — pin authority is actions.lock (sha1-ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7) | ||
|
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 | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '--- workflow ---'
sed -n '35,48p' .github/workflows/push-email-notify.yml
printf '%s\n' '--- lock entry ---'
rg -n -C 2 'hyperpolymath/smtp-notify-action|ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7' actions.lock .github 2>/dev/null || true
printf '%s\n' '--- action metadata ---'
curl -fsSL https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/v0.2.0/action.yml
printf '%s\n' '--- repository tree at v0.2.0 ---'
curl -fsSL 'https://api.github.com/repos/hyperpolymath/smtp-notify-action/git/trees/v0.2.0?recursive=1' |
jq -r '.tree[] | select(.type == "blob") | .path' |
head -80Repository: hyperpolymath/the-metadatastician Length of output: 8647 🏁 Script executed: #!/bin/bash
set -u
for file in src/main.zig src/smtp.zig README.adoc MIGRATION.adoc; do
printf '\n--- %s ---\n' "$file"
curl -fsSL "https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/v0.2.0/$file" |
rg -n -C 3 'AUTH|STARTTLS|implicit|secure|SMTP_PORT|SMTP_SECURE|TLS|unsupported|authentication' || true
done
printf '\n--- remaining workflow inputs ---\n'
sed -n '43,65p' .github/workflows/push-email-notify.ymlRepository: hyperpolymath/the-metadatastician Length of output: 20418 Verify SMTP provider compatibility before merging. If 🤖 Prompt for AI AgentsSource: MCP tools 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- workflow ---'
sed -n '1,90p' .github/workflows/push-email-notify.yml
printf '%s\n' '--- lock files and references ---'
find . -maxdepth 4 -type f \( -name 'actions.lock' -o -iname '*action*lock*' \) -print
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' \
'actions\.lock|hyperpolymath/smtp-notify-action|NOSONAR|uses:' \
.github . 2>/dev/null | head -250Repository: hyperpolymath/the-metadatastician Length of output: 13348 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- actions.lock ---'
cat -n .github/workflows/actions.lock
printf '%s\n' '--- lock enforcement references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' \
'gh actions-lock|actions-lock|lock enforcement|lockfile|actions\.lock' \
.github README.md CONTRIBUTING.md package.json Makefile 2>/dev/null | head -200
printf '%s\n' '--- workflow files mentioning the lock ---'
fd -t f -e yml -e yaml .github/workflows -x sh -c \
'rg -n "actions\.lock|actions-lock" "$1" 2>/dev/null' sh {} \;Repository: hyperpolymath/the-metadatastician Length of output: 4361 🌐 Web query:
💡 Result: The GitHub CLI extension Citations:
Use an immutable action reference. GitHub Actions does not enforce 🤖 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 | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,90p' .github/workflows/push-email-notify.ymlRepository: hyperpolymath/the-metadatastician
Length of output: 3108
🌐 Web query:
GitHub Actions push event branch deletion workflow runs github.event.deleted branches filter💡 Result:
To handle branch deletions in GitHub Actions, you should use the delete event rather than relying on the push event [1][2]. When a branch is deleted, the push event may trigger a workflow run on the repository's default branch, which can lead to unintended behavior [3][4]. The delete event provides a specific way to trigger workflows when a Git reference (such as a branch or tag) is deleted [1]. Key points for implementing a branch deletion workflow: 1. Triggering on Deletion: Use the delete event in your workflow configuration [1]. on: delete: 2. Filtering by Ref Type: The delete event triggers for both branches and tags [1]. To ensure your job only runs when a branch is deleted, use a conditional if filter to check the event type [2][5]: jobs: cleanup: if: github.event.ref_type == 'branch' runs-on: ubuntu-latest 3. Accessing the Deleted Branch Name: When the delete event occurs, standard context variables like GITHUB_REF may point to the repository's default branch [2][6]. To get the name of the branch that was actually deleted, use the github.event.ref context variable [2][6]: steps: - name: Get deleted branch name run: echo "The deleted branch was ${{ github.event.ref }}" Note that for the delete event to trigger, the workflow file must exist on the default branch of your repository [1]. Because the push event also triggers on branch deletions (often running on the default branch), you may also need to add logic to your push-triggered workflows to ignore these events if they are causing unwanted runs [3].
Citations:
🌐 Web query:
site:docs.github.com webhook push payload deleted head_commit null GitHub💡 Result:
When a GitHub push webhook event payload contains
head_commit: null, it indicates that the branch or tag associated with the push has been deleted [1][2]. The GitHubpushevent is triggered by various actions, including creating or deleting references (branches or tags) [1]. According to official GitHub documentation, thehead_commitfield is defined as anobject or null[1][3]. When a reference is deleted, there is no "head" commit remaining for that reference, resulting in this field being null in the webhook payload [1][2]. To confirm that the push event was caused by a deletion, you should check thedeletedboolean field in the same payload, which will be set totrue[1][4].Citations:
Exclude deleted branch pushes explicitly.
A deleted branch
pushpayload can havegithub.event.deleted == trueandgithub.event.head_commit == null. WithPUSH_EMAIL_ENABLED == 'true', this job can send an email with an emptyHead msgfield. Add!github.event.deletedto the job condition.🤖 Prompt for AI Agents
Source: MCP tools