-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #73
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add a concurrency policy for SMTP sends.
When
PUSH_EMAIL_ENABLEDistrue, this workflow can run for every branch push, but it defines noconcurrencygroup. A burst of pushes can start multiple SMTP sends and recreate the notification storm described in the header. Add a deliberate serialisation or coalescing policy. Choose cancellation carefully because an SMTP send may already be accepted when a run is cancelled. (docs.github.com)🧰 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
Source: Linters/SAST tools
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,120p' .github/workflows/push-email-notify.ymlRepository: hyperpolymath/docmatrix
Length of output: 1977
🌐 Web query:
GitHub Actions push event branches filter branch deletion events github.event.deleted workflow syntax💡 Result:
In GitHub Actions, the
pushevent includes branch deletion as a triggering activity [1]. When a branch is deleted, GitHub sends apushpayload where thedeletedproperty is set totrue[1]. Because thepushevent triggers for both creations and deletions, workflows configured to run onpushwill execute when a branch is deleted unless explicitly filtered. Workflow Syntax for Filtering Standardbranchesorbranches-ignorefilters in theon.pushsection are designed to filter based on the branch name, but they do not inherently filter out the deletion event itself [2][3]. To prevent a workflow from running when a branch is deleted, you must use a conditionalifstatement at the job level [4]: jobs: my_job: if: ${{!github.event.deleted }} runs-on: ubuntu-latest steps: - run: echo "This job will not run on branch deletion." Handling Branch Deletion Events If your goal is to trigger a workflow specifically for branch deletions, you should use thedeleteevent instead ofpush[1]. Note that when using thedeleteevent, the branch has already been removed from the repository, so you cannot check out the code of the deleted branch in the same way you would during apush[5]. Example of a workflow using thedeleteevent: on: delete: jobs: on-delete: if: github.event.ref_type == 'branch' runs-on: ubuntu-latest steps: - name: Handle branch deletion run: echo "Deleted branch: ${{ github.event.ref }}" Summary of key points: - Thepushevent triggers on branch deletion (payloaddeleted: true) [1]. - Useif: ${{ !github.event.deleted }}in your job to skip workflows during deletions [4]. - Use thedeleteevent if you need to react specifically to the act of a branch being removed [1]. - Workflow filters (branches,tags) target the ref name, not the deletion status [2].Citations:
Exclude branch deletion events from the notification job.
The
pushevent includes branch deletions, andbranchesfilters do not exclude them. A deletion payload can havehead_commit: null. Add&& !github.event.deletedto 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