From ecb1a51362ba6f903230692f32e8e6f127380e28 Mon Sep 17 00:00:00 2001 From: Ian Littman Date: Fri, 6 Jun 2025 16:38:58 -0600 Subject: [PATCH] Add missing docs for updated_script activity (#29803) Work was done in a previous release but (probably due to a merge conflict resolution) the activity list update was missed, so docs were missing this. --- docs/Contributing/reference/audit-logs.md | 19 +++++++++++++++++++ server/fleet/activities.go | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/Contributing/reference/audit-logs.md b/docs/Contributing/reference/audit-logs.md index 60bfa56dc0..b2c417dd51 100644 --- a/docs/Contributing/reference/audit-logs.md +++ b/docs/Contributing/reference/audit-logs.md @@ -1014,6 +1014,25 @@ This activity contains the following fields: } ``` +## updated_script + +Generated when a script is updated. + +This activity contains the following fields: +- "script_name": Name of the script. +- "team_id": The ID of the team that the script applies to, `null` if it applies to devices that are not in a team. +- "team_name": The name of the team that the script applies to, `null` if it applies to devices that are not in a team. + +#### Example + +```json +{ + "script_name": "set-timezones.sh", + "team_id": 123, + "team_name": "Workstations" +} +``` + ## created_windows_profile Generated when a user adds a new Windows profile to a team (or no team). diff --git a/server/fleet/activities.go b/server/fleet/activities.go index 57b34f1d8f..7585a7e749 100644 --- a/server/fleet/activities.go +++ b/server/fleet/activities.go @@ -158,7 +158,8 @@ var ActivityDetailsList = []ActivityDetails{ ActivityTypeRanScript{}, ActivityTypeAddedScript{}, ActivityTypeDeletedScript{}, - ActivityTypeEditedScript{}, + ActivityTypeEditedScript{}, // via GitOps + ActivityTypeUpdatedScript{}, // via individual script update endpoint ActivityTypeCreatedWindowsProfile{}, ActivityTypeDeletedWindowsProfile{},