-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #59
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@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 | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '1,90p' .github/workflows/push-email-notify.yml
printf '\n--- pinned action metadata ---\n'
curl -fsSL https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7/action.yml
printf '\n--- action implementation references ---\n'
curl -fsSL https://api.github.com/repos/hyperpolymath/smtp-notify-action/commits/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7 \
| jq -r '.sha, .commit.message'Repository: hyperpolymath/eclexiaiser Length of output: 10049 🤖 get_repo_knowledge executed:
Length of output: 1380 🌐 Web query:
💡 Result: To use Microsoft 365 SMTP client submission, you must configure your application or device using the following parameters: - SMTP Server: smtp.office365.com [1][2] - Port: 587 (recommended) or 25 [1][2] - Encryption: STARTTLS (requires TLS 1.2 or 1.3) [1][2] - Authentication: Modern Authentication (OAuth 2.0) is the recommended standard [1][2]. Basic Authentication (username and password) has been deprecated for SMTP client submission [3][4]. Important Configuration Notes: 1. SMTP AUTH Requirements: SMTP AUTH must be enabled for the specific mailbox being used [5][6]. By default, it is often disabled for new Microsoft 365 tenants and when security defaults are enabled [5][7]. It can be enabled or disabled at the tenant level or overridden per mailbox in the Microsoft 365 admin center (under Users > Active users > Manage email apps) or via Exchange Online PowerShell using Set-CASMailbox [5][6]. 2. Security Defaults: If security defaults are enabled in your Microsoft Entra ID (formerly Azure AD), SMTP AUTH is disabled globally [5][6]. To use SMTP AUTH, security defaults must be disabled [5]. 3. Authentication Method: While some configurations may historically have accepted basic authentication, Microsoft has moved toward requiring Modern Authentication (OAuth 2.0) for all Exchange Online protocols [3][4]. Devices or applications that cannot support OAuth 2.0 may face significant connectivity issues or be blocked by security policies [1][4]. 4. Hostname: Always use the DNS name smtp.office365.com [1][2]. Do not use an IP address, as these can change [1][2]. For further guidance, consult the official Microsoft documentation on setting up multifunction devices or applications for Microsoft 365 [1][2] and managing SMTP AUTH settings [5][6]. Citations:
🏁 Script executed: curl -fsSL https://api.github.com/repos/hyperpolymath/smtp-notify-action/releases/tags/v0.2.0 \
| jq '{tag_name, draft, prerelease, assets: [.assets[] | {name, browser_download_url}]}'Repository: hyperpolymath/eclexiaiser Length of output: 810 Use an SMTP action that supports the configured provider. If these secrets target Microsoft 365, this step fails because Microsoft 365 uses STARTTLS on 🤖 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:
Repository: hyperpolymath/eclexiaiser
Length of output: 5468
🌐 Web query:
GitHub Actions workflow syntax push event branch deletion github.event.deleted head_commit null official documentation💡 Result:
In GitHub Actions, the push event is triggered not only when commits are pushed, but also when a branch or tag is deleted [1]. When a branch is deleted, the push event payload includes a
deletedfield set totrue, and thehead_commitobject isnull[1]. Becausehead_commitisnullduring a branch deletion, workflows that referencegithub.event.head_commit(e.g., to access commit messages or metadata) will fail if they do not account for this state. To handle branch deletions gracefully in a workflow triggered by a push event, you can use a conditionalifstatement to skip jobs or steps whengithub.event.deletedistrue[2][3][4]. Example syntax to prevent execution on branch deletion: jobs: build: if: ${{!github.event.deleted }} runs-on: ubuntu-latest steps: - run: echo "This job will not run on branch deletion." Alternatively, if you need to perform specific logic when a branch is deleted, you can explicitly check for that event type [2]: jobs: on-delete: if: ${{ github.event.deleted }} runs-on: ubuntu-latest steps: - run: echo "Branch ${{ github.event.ref }} was deleted." If your workflow requires specific commit information, it is recommended to always verify thatgithub.event.head_commitis not null before accessing its properties, or use the!github.event.deletedcheck to ensure the code only runs on standard push operations [3][4].Citations:
Exclude branch-deletion events from the notification job.
When
PUSH_EMAIL_ENABLEDistrue, a branch-deletion push can reachnotifybecausebranches: ['**']does not exclude deletions. The email body then receives a nullgithub.event.head_commitand has no commit message.Add
&& !github.event.deletedto the job condition.🤖 Prompt for AI Agents
Source: MCP tools