-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #60
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,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@6e502825a508b867ab2954ad6343b68787624c01 # 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 | 🔵 Trivial 🔎 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' '--- pinned action metadata ---'
curl -fsSL https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7/action.ymlRepository: hyperpolymath/InvestigativeJournalism.jl Length of output: 8562 🤖 get_repo_knowledge executed:
Length of output: 3507 🌐 Web query:
💡 Result: To use SMTP AUTH client submission with Microsoft 365, configure your application or device with the following settings [1][2]: Server/Smart host: smtp.office365.com [1][2] TCP Port: 587 (recommended) or 25 [1][2] Encryption: STARTTLS (TLS 1.2 or 1.3 is required) [1][2] Authentication: SMTP AUTH (Username and Password) [1][3] Username: Full email address of the licensed Microsoft 365 mailbox [1][2][3] Password: Password of the mailbox [1][2][3] Important Configuration and Security Notes: - Prerequisites: The mailbox must be licensed and active [2][4]. SMTP AUTH must be explicitly enabled for the specific mailbox in the Microsoft 365 admin center or via Exchange Online PowerShell using Set-CASMailbox -Identity -SmtpClientAuthenticationDisabled $false [5][6][3]. - Security Defaults: If Security Defaults are enabled in your organization, SMTP AUTH is disabled by default [5][6]. - Authentication Method: While the settings above use traditional credentials, Microsoft is actively transitioning away from Basic authentication [7][8]. As of September 2026, SMTP AUTH Basic Authentication behavior remains unchanged until the end of December 2026, at which point it will be disabled by default for existing tenants [8]. It is highly recommended to use OAuth (Modern Authentication) whenever possible to ensure long-term compatibility and security [1][5][7]. Do not use an IP address for the SMTP server [1][2]. Citations:
Use an implicit-TLS SMTP endpoint for this workflow.
🤖 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/InvestigativeJournalism.jl
Length of output: 3468
🤖 get_repo_knowledge executed:
get_repo_knowledge hyperpolymath/InvestigativeJournalism.jl /tmp/coderabbit-repo-knowledge/hyperpolymath-investigativejournalism-jl-2566f996Length of output: 3521
🌐 Web query:
site:docs.github.com GitHub Actions push event deleted branch github.event.deleted head_commit null branches filter💡 Result:
In GitHub Actions, the push event is triggered when a branch is deleted [1][2]. When this happens, the
head_commitproperty in the webhook payload isnull[1][2]. Because thepushevent fires for both standard pushes and deletions, workflows configured to process commits (e.g., those accessinggithub.event.head_commit) may fail if they do not explicitly check for this condition. To handle deleted branches and avoid errors caused bynullvalues: 1. Check thedeletedflag: Thepushevent payload contains a boolean field nameddeleted[1][2]. You can check if the event is a deletion using${{ github.event.deleted }}in anifcondition within your workflow steps. 2. Verifyhead_commitexists: Ensure your code or script checks ifgithub.event.head_commitis not empty before accessing its properties. Example usage in a workflow: jobs: build: runs-on: ubuntu-latest steps: - name: Check if branch was deleted if: github.event.deleted == true run: echo "This push event was a branch deletion." - name: Process commit if: github.event.deleted == false run: | echo "Processing commit: ${{ github.event.head_commit.id }}" Regardingbranchesfilters: Thebranchesandbranches-ignorefilters in workflow syntax define which branch names trigger the workflow [3][4]. While you can filter by branch name, these filters are evaluated against the Git ref name and do not inherently filter out deletion events. If a branch deletion occurs on a branch that matches your filter pattern, the workflow will trigger [3][4]. Therefore, you must use conditional logic within the workflow steps (as shown above) to safely handle the deletion event [1][2]. If you only want to trigger workflows on branch deletions, you can use thedeleteevent instead ofpush[5][6]. However, note that thedeleteevent will only trigger a workflow if the deletion occurs on the default branch [5][6].Citations:
Exclude deleted branches from the notification job.
branches: ['**']also matches branch-deletionpushevents. These events setgithub.event.deletedtotrueandgithub.event.head_committonull, so the notification can contain an empty commit message. Add!github.event.deletedto the job condition.🤖 Prompt for AI Agents
Source: MCP tools