Skip to content

Added delete release audit event

What does this MR do and why?

This MR creates an audit event when a release is deleted via the API.

Screenshots or screen recordings

Deleted_Release_Audit_Event

How to set up and validate locally

  1. Create a release via the API
# Create a release
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: $PAT" \
     --data '{ "name": "Alpha1", "tag_name": "v1.5.2", "description": "Super nice release", "assets": { "links": [{ "name": "hoge", "url": "https://google.com", "filepath": "/binaries/linux-amd64", "link_type":"other" }] } }' \
     --request POST "http://localhost:3000/api/v4/projects/6/releases"
  1. Delete the release
curl -X DELETE -H "PRIVATE-TOKEN: $PAT" http://localhost:3000/api/v4/projects/6/releases/v1.5.2 | jq
  1. Navigate to the project and check audit logs. You should see one for Deleted Release.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #39556

Merge request reports