feat(servicenow): pull incident activity into Keep alerts and incidents#5528
Open
nexicturbo wants to merge 2 commits intokeephq:mainfrom
Open
feat(servicenow): pull incident activity into Keep alerts and incidents#5528nexicturbo wants to merge 2 commits intokeephq:mainfrom
nexicturbo wants to merge 2 commits intokeephq:mainfrom
Conversation
Enhance the existing ServiceNow provider to support pulling incidents as both Keep alerts and Keep incidents, with full activity enrichment. Changes: - Extend class to inherit BaseIncidentProvider (alongside BaseTopologyProvider) - Implement _get_alerts() to pull ServiceNow incidents as AlertDto objects - Implement _get_incidents() to pull incidents as IncidentDto objects - Add _format_alert() static method for incident→alert mapping - Add _format_incident() static method for incident→incident mapping - Add _query_incidents() for paginated incident table queries - Add _query_incident_activity() for bulk journal/activity fetching from sys_journal_field (comments + work notes) - Map ServiceNow incident states to Keep AlertStatus/IncidentStatus - Map ServiceNow priority levels to Keep AlertSeverity/IncidentSeverity - Enrich alerts/incidents with recent activity data (comments, work notes) - Add helper methods (_get_auth, _get_headers, _parse_snow_datetime, etc.) - Add PROVIDER_CATEGORY 'Incident Management' and PROVIDER_TAGS 'alert', 'incident' - Add FINGERPRINT_FIELDS for deduplication Resolves: keephq#3379
|
@nexicturbo is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Target branch is not in the allowed branches list. |
… Keep incidents - Extend ServicenowProvider to inherit from BaseIncidentProvider alongside BaseTopologyProvider - Add _get_alerts() to pull ServiceNow incidents as Keep AlertDto objects - Add _get_incidents() to pull ServiceNow incidents as Keep IncidentDto objects - Add incident activity pulling via sys_journal_field table (comments & work notes) - Add _add_comment() and _add_work_note() for bidirectional activity sync - Map ServiceNow incident states (New/In Progress/On Hold/Resolved/Closed/Canceled) to Keep statuses - Map ServiceNow priorities (1-5) to Keep AlertSeverity and IncidentSeverity - Add paginated result fetching with _get_paginated_results() helper - Refactor auth/headers into reusable _get_headers() and _get_auth() methods - Fix auth logic bug in _notify_update (was using basic auth when OAuth token was present) - Add 'incident' to PROVIDER_TAGS and 'Incident Management' to PROVIDER_CATEGORY Closes keephq#3379 /claim keephq#3379
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Enhances the existing ServiceNow provider to pull incident activity (comments and work notes) into Keep incidents, and enables bidirectional activity sync.
Closes #3379
/claim #3379
Changes
New Capabilities
Mappings
Infrastructure Improvements
ServiceNow API Endpoints Used
Testing