-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #21
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
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
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/glyphbase
Length of output: 3548
🌐 Web query:
GitHub Actions push event branch deletion branches filter deleted true workflow💡 Result:
In GitHub Actions, there is no built-in "deleted: true" filter for the push event [1][2]. While the
pushevent is triggered when a branch is deleted [1][2], GitHub does not provide a direct configuration option to filter these events based on their deletion status within theon.pushconfiguration block [1][3]. To handle branch deletions in workflows, you should use the following approaches: 1. Use the dedicateddeleteevent: Instead of relying on thepushevent, use theon: deletetrigger [4][5]. This event is specifically designed to handle the deletion of Git references, including branches and tags [2]. 2. Filter for branch deletions: When using thedeleteevent, ensure you filter for branches specifically by checkinggithub.event.ref_typein your job conditions [4][5]:yaml on: delete jobs: cleanup: if: github.event.ref_type == 'branch' runs-on: ubuntu-latest steps: - name: Handle branch deletion run: echo "The branch ${{ github.event.ref }} was deleted."3. Identify the deleted branch: Because thedeleteevent triggers after the branch has already been removed,GITHUB_REFwill point to the repository's default branch [4][5]. To identify the name of the branch that was deleted, use thegithub.event.refcontext variable [4][5]. 4. Handling Push Event behavior: If you must use thepushevent (e.g., to perform actions on both creation and deletion), be aware that thepushevent payload contains adeletedboolean property [2]. While you cannot use this as a workflow-level filter in theon:block, you can use it in a jobifcondition to conditionally execute steps [6]:yaml jobs: my-job: if: github.event.deleted == true runs-on: ubuntu-latest steps: - name: Process deleted branch run: echo "Branch ${{ github.ref_name }} was deleted."Note that thepushevent for a branch deletion will still technically run on the default branch context [1][7]. If your goal is specifically to ignore deleted branches within apushworkflow, you can addif: ${{ !github.event.deleted }}to your job definition [6].Citations:
Exclude deleted branch pushes
branches: ['**']does not exclude branch deletion push events. When enabled, the job condition can send an email withgithub.event.deleted == trueand nohead_commit. Add&& !github.event.deletedto the condition.🤖 Prompt for AI Agents
Source: MCP tools