uselagoon / lagoon

Lagoon, the developer-focused application delivery platform
https://docs.lagoon.sh/
Apache License 2.0
555 stars 148 forks source link

refactor: send organization information in build and task payloads #3596

Closed shreddedbacon closed 8 months ago

shreddedbacon commented 9 months ago

General Checklist

Database Migrations

Update the build and task data payloads to inject the organization name and ID if they are present on a project.

Closing issues

partially #3595

tobybellwood commented 9 months ago

Comparing the payloads:

builds:

      "project":{
         "id":18,
         "name":"lagoon-demo-org",
         "organization":{
            "name":"lagoon-demo-organization",
            "id":1
         },
         ...
      "project":{
         "id":18,
         "name":"lagoon-demo",
         "organization":{

         },

and tasks:

   "project":{
      "id":180,
      "name":"lagoon-demo-org",
      "organization":{
         "name":"lagoon-demo-organization",
         "id":1
      },
      ...
   "project":{
      "id":18,
      "name":"lagoon-demo",
      "organization":null,

Is there a reason why tasks shouldn't be an empty object (or builds null) - just checking on the inconsistency

shreddedbacon commented 9 months ago

Is there a reason why tasks shouldn't be an empty object (or builds null) - just checking on the inconsistency

I've updated it so the two results are null if no organization