Skip to content

Handles omitted webhooks array and unnests the webhook dialog dropdown button - #889

Open
seb-kw wants to merge 1 commit into
mainfrom
fix/webhook-omitted-array
Open

Handles omitted webhooks array and unnests the webhook dialog dropdown button#889
seb-kw wants to merge 1 commit into
mainfrom
fix/webhook-omitted-array

Conversation

@seb-kw

@seb-kw seb-kw commented Aug 12, 2026

Copy link
Copy Markdown
Member

No description provided.

…n button

Signed-off-by: Sebastian Kawelke <sebastian.kawelke@l3montree.com>
Comment thread src/types/api/api.ts
jiraIntegrations: Array<JiraIntegrationDTO>;

webhooks: Array<WebhookDTO>;
// omitted by the API when there are none

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get that information from?

https://github.com/l3montree-dev/devguard/blob/main/dtos/project_dto.go#L80

There is no omitempty JSON tag assigned to the webhooks slice. It is true that we do not always return the same DTO for projects. But we need to understand what DTO we actually need and why we don't get it there. Maybe we are updating a project and returning the wrong DTO afterward, and the client sets it to its state, which is the real issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-08-12 at 15 26 29

I logged the data object that I get from backend and saw (first block in screenshot), that if I have no webhook configured at all the response does not contain a webhook entry with empty array... So I assumed that the backend drops if no content to send.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But strange - as you stated for project, when I get it right the https://github.com/l3montree-dev/devguard/blob/main/dtos/org_dto.go#L116 org dto does not have an omitempty either...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants