Skip to content
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

Fixed general webhook option notifications not firing #15909

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Dec 2, 2024

Description

This fixes an issue with the general webhook not firing. If the general webhook is selected, it uses the slack notification files. The SlackWebhookChannel class was looking for slack when we were passing in general.

Since we changed how notifications are triggered, a method has been added that if the general webhook is selected we will return slack in the listener's notification route instead of passing general instead of waiting for it to trigger later on in the stack. (if that makes sense)

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)

@Godmartinz Godmartinz requested a review from snipe as a code owner December 2, 2024 18:23
Copy link

what-the-diff bot commented Dec 2, 2024

PR Summary

  • Improvement in Notification Routing
    This update introduces a more efficient way of choosing the type of notification that will be sent. We have transferred this choosing mechanism to the exclusive method webhookSelected(). It simplifies the whole process by eliminating the need for direct access to the settings every time a choice has to be made.

  • Introduction of webhookSelected() Method
    A new private method named webhookSelected() has been added. The function's main role is to decide which webhook is the most appropriate according to the current settings. It's specifically designed to handle 'slack' and 'general' cases, thus making the solution more robust and less error-prone.

@Godmartinz Godmartinz requested review from marcusmoore and snipe and removed request for snipe December 2, 2024 18:24
@Godmartinz Godmartinz changed the title fixes general webhook not firing Fixd general webhook notifications not firing Dec 2, 2024
@Godmartinz Godmartinz changed the title Fixd general webhook notifications not firing Fixd general webhook option notifications not firing Dec 2, 2024
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Confirmed the bug and this fix locally 👍🏾

@Godmartinz Godmartinz changed the title Fixd general webhook option notifications not firing Fixed general webhook option notifications not firing Dec 2, 2024
@snipe snipe merged commit 2ad1407 into snipe:develop Dec 2, 2024
9 checks passed
snipe added a commit that referenced this pull request Dec 12, 2024
commit 01c18f6
Merge: 4d1d2fe c5e2aed
Author: snipe <[email protected]>
Date:   Thu Dec 12 17:40:40 2024 +0000

    Merge pull request #15962 from snipe/fixes_rb-18772

commit c5e2aed
Author: snipe <[email protected]>
Date:   Thu Dec 12 17:37:08 2024 +0000

    Check for assigned (not assigned_to) before trying to present() the name on bulk delete assets

    Signed-off-by: snipe <[email protected]>

commit 4d1d2fe
Merge: ab6363a a0e7dcf
Author: snipe <[email protected]>
Date:   Thu Dec 12 17:05:10 2024 +0000

    Merge pull request #15960 from uberbrady/improve_restore_cleaner_utf8

commit ab6363a
Merge: f089d1f da33f18
Author: snipe <[email protected]>
Date:   Thu Dec 12 16:53:15 2024 +0000

    Merge pull request #15959 from snipe/remove_settings_api_endpoints

commit a0e7dcf
Author: Brady Wetherington <[email protected]>
Date:   Thu Dec 12 16:50:36 2024 +0000

    Fixes to 'clean' mode to better handle character sets and zero-values

commit da33f18
Author: snipe <[email protected]>
Date:   Thu Dec 12 16:46:19 2024 +0000

    Removed index and destroy settinga API endpoints

    Signed-off-by: snipe <[email protected]>

commit f089d1f
Merge: 4bd6c21 67494c1
Author: snipe <[email protected]>
Date:   Thu Dec 12 01:42:26 2024 +0000

    Merge pull request #15944 from marcusmoore/bug/required-display-for-selects

commit 4bd6c21
Merge: a7e6b8e 3264149
Author: snipe <[email protected]>
Date:   Thu Dec 12 00:38:21 2024 +0000

    Merge pull request #15957 from Godmartinz/fix-checkout-notif-parameters

commit 67494c1
Author: Marcus Moore <[email protected]>
Date:   Wed Dec 11 16:26:23 2024 -0800

    Fix validation messages for select2 inputs

commit 3264149
Author: Godfrey M <[email protected]>
Date:   Wed Dec 11 16:26:18 2024 -0800

    fix other mailables

commit 8417fcb
Author: Marcus Moore <[email protected]>
Date:   Wed Dec 11 16:25:45 2024 -0800

    Revert "Show frontend "required" validation for model and status selects"

    This reverts commit 10a7ae8.

commit 400833f
Author: Godfrey M <[email protected]>
Date:   Wed Dec 11 16:14:06 2024 -0800

    reversed order of the acceptance and note paramter

commit a7e6b8e
Merge: b9a6606 6e31d0f
Author: snipe <[email protected]>
Date:   Wed Dec 11 23:52:33 2024 +0000

    Merge pull request #15956 from marcusmoore/bug/sc-27731

commit 6e31d0f
Author: Marcus Moore <[email protected]>
Date:   Wed Dec 11 15:39:41 2024 -0800

    Use appropriate category for licenses when seeding

commit b9a6606
Merge: 06a0ac8 014350a
Author: snipe <[email protected]>
Date:   Wed Dec 11 20:42:13 2024 +0000

    Merge pull request #15955 from ubc-cpsc/bugfix/GHSA-c2pc-g5qf-rfrf

commit 014350a
Author: Joël Pittet <[email protected]>
Date:   Wed Dec 11 12:04:45 2024 -0800

    Fix league/commonmark's quadratic complexity bugs may lead to a denial of service

commit 06a0ac8
Author: snipe <[email protected]>
Date:   Wed Dec 11 18:34:18 2024 +0000

    Fixed #15928 - updated method name to setCreatedBy from SetUserId

    Signed-off-by: snipe <[email protected]>

commit 34a47e9
Author: snipe <[email protected]>
Date:   Wed Dec 11 18:09:53 2024 +0000

    Add @sgross-emlix as a contributor

commit f5a9e4b
Author: snipe <[email protected]>
Date:   Wed Dec 11 18:09:19 2024 +0000

    Fixes #15952 - fixed typo in content-type

    Signed-off-by: snipe <[email protected]>

commit 6633948
Merge: 5014a95 2e97b56
Author: snipe <[email protected]>
Date:   Wed Dec 11 17:38:59 2024 +0000

    Merge pull request #15954 from Godmartinz/null_fix-for-reminder-command

commit 2e97b56
Author: Godfrey M <[email protected]>
Date:   Wed Dec 11 09:27:27 2024 -0800

    add null safe operator to acceptance reminder

commit 5014a95
Author: snipe <[email protected]>
Date:   Tue Dec 10 13:27:59 2024 +0000

    Updated supported versions

    Signed-off-by: snipe <[email protected]>

commit 10a7ae8
Author: Marcus Moore <[email protected]>
Date:   Mon Dec 9 16:09:51 2024 -0800

    Show frontend "required" validation for model and status selects

commit 5f0efd8
Merge: cc8f72c 31155b5
Author: snipe <[email protected]>
Date:   Mon Dec 9 19:35:31 2024 +0000

    Merge pull request #15940 from snipe/reove_gh_templates

commit 31155b5
Author: snipe <[email protected]>
Date:   Mon Dec 9 19:28:51 2024 +0000

    Removed issue/PR templates

    Signed-off-by: snipe <[email protected]>

commit cc8f72c
Merge: a0bab70 f6b9ae6
Author: snipe <[email protected]>
Date:   Mon Dec 9 19:23:13 2024 +0000

    Merge pull request #15914 from Godmartinz/send_reminder_emails

commit a0bab70
Merge: 0149ed7 b5c8251
Author: snipe <[email protected]>
Date:   Mon Dec 9 17:56:23 2024 +0000

    Merge pull request #15939 from uberbrady/fix_ldap_asset_location_updater

commit b5c8251
Author: Brady Wetherington <[email protected]>
Date:   Mon Dec 9 17:40:10 2024 +0000

    Only update asset locations to assets checked out to users.

commit 0149ed7
Merge: f726359 4f9f035
Author: snipe <[email protected]>
Date:   Mon Dec 9 17:00:10 2024 +0000

    Merge pull request #15565 from spencerrlongg/bug/sc-25921

commit f726359
Merge: a137e31 5120cdd
Author: snipe <[email protected]>
Date:   Mon Dec 9 16:40:21 2024 +0000

    Merge pull request #15925 from Godmartinz/refactor-unaccepted-assets-reminder-notif

commit 5120cdd
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 16:02:55 2024 -0800

    delete notification version of reminder

commit 97398f1
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 12:41:33 2024 -0800

    adds testing to unaccepted reminder command

commit 281ff6a
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 11:52:34 2024 -0800

    wrap comment

commit 9d49b01
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 11:46:56 2024 -0800

    cleans up the Unaccepted Asset reminder variables

commit 3f8916e
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 11:37:03 2024 -0800

    fix duplicate emails being sent in unaccepted reminder command

commit f6b9ae6
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 10:18:35 2024 -0800

    missed a spot

commit de41def
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 10:15:57 2024 -0800

    fixed conditionals

commit 52b051e
Author: Godfrey M <[email protected]>
Date:   Thu Dec 5 10:08:39 2024 -0800

    add mail class for unaccepted assets reminders

commit a137e31
Merge: 43d66a8 ca0f8ac
Author: snipe <[email protected]>
Date:   Wed Dec 4 21:46:43 2024 +0000

    Merge pull request #15920 from akemidx/asset-category-in-emails

commit ca0f8ac
Author: akemidx <[email protected]>
Date:   Tue Dec 3 16:57:28 2024 -0500

    fixed

commit 6252f0a
Author: akemidx <[email protected]>
Date:   Tue Dec 3 16:10:42 2024 -0500

    layout / added category id

commit 43d66a8
Merge: 2ad1407 e5284c0
Author: snipe <[email protected]>
Date:   Tue Dec 3 17:17:26 2024 +0000

    Merge pull request #15918 from Godmartinz/mail_name_fix

    Adds `MAIL_FROM_NAME` to mail envelope

commit e5284c0
Author: Godfrey M <[email protected]>
Date:   Tue Dec 3 09:10:50 2024 -0800

    fix typo

commit 16283b8
Author: Godfrey M <[email protected]>
Date:   Tue Dec 3 09:08:39 2024 -0800

    adds mail from name to mail envelope

commit 983b78e
Author: Godfrey M <[email protected]>
Date:   Mon Dec 2 14:27:04 2024 -0800

    add property check

commit 2ad1407
Merge: 1473018 99464fc
Author: snipe <[email protected]>
Date:   Mon Dec 2 22:03:32 2024 +0000

    Merge pull request #15909 from Godmartinz/checkin-out-notifications

    Fixed general webhook option notifications not firing

commit ab67c48
Author: Godfrey M <[email protected]>
Date:   Mon Dec 2 13:03:09 2024 -0800

    fix unaccepted assets report resend acceptance

commit 99464fc
Author: Godfrey M <[email protected]>
Date:   Mon Dec 2 10:19:24 2024 -0800

    fixes general webhook not firing

commit 4f9f035
Author: spencerrlongg <[email protected]>
Date:   Mon Sep 30 20:09:00 2024 -0500

    added a way to manipulate validator attribute names

commit cd3059f
Author: spencerrlongg <[email protected]>
Date:   Mon Sep 30 13:38:52 2024 -0500

    rm numbers too. :(

commit b69596a
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 16:21:33 2024 -0500

    rm dump

commit d02b993
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 15:38:40 2024 -0500

    rm comment

commit 852a56f
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 15:30:41 2024 -0500

    should be all good now

commit 9df78a9
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 14:00:50 2024 -0500

    working! need formatting for error messages etc

commit f3ad899
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 13:00:35 2024 -0500

    hm ok this kind of works

commit 21906d8
Author: spencerrlongg <[email protected]>
Date:   Wed Sep 25 12:47:56 2024 -0500

    world set up and idea in place

Signed-off-by: snipe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants