MCPcopy Index your code
hub / github.com/Flagsmith/flagsmith / generate_organisation_sample_webhook_data

Function generate_organisation_sample_webhook_data

api/webhooks/webhooks.py:396–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394
395
396def generate_organisation_sample_webhook_data() -> dict[str, Any]:
397 project = Project(id=1, name="Test Project", organisation_id=1)
398
399 author = FFAdminUser(
400 id=1, email="user@domain.com", first_name="Jane", last_name="Doe"
401 )
402
403 data = {
404 "created_date": "2020-02-23T17:30:57.006318Z",
405 "log": "New Flag / Remote Config created: my_feature",
406 "author": {
407 "id": author.id,
408 "email": author.email,
409 "first_name": author.first_name,
410 "last_name": author.last_name,
411 },
412 "environment": None,
413 "project": {
414 "id": project.id,
415 "name": project.name,
416 "organisation": project.organisation_id,
417 },
418 "related_object_id": 1,
419 "related_object_type": "FEATURE",
420 }
421
422 return {"data": data, "event_type": WebhookEventType.AUDIT_LOG_CREATED.value}

Callers 1

Calls 2

ProjectClass · 0.90
FFAdminUserClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…