From 1c2b30ae14fc59666604497d7e6c6a8c2e7beab0 Mon Sep 17 00:00:00 2001 From: Vlad Klokun Date: Wed, 10 Aug 2022 16:59:46 +0300 Subject: [PATCH 1/2] docs: add comments to the Notification struct The added comments add info that can be used to generate OpenAPI specs from the source code. --- notificationserver/datastructures.go | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/notificationserver/datastructures.go b/notificationserver/datastructures.go index 32fd135..aa9e664 100644 --- a/notificationserver/datastructures.go +++ b/notificationserver/datastructures.go @@ -1,8 +1,22 @@ package notificationserver -// Notification passed between servers +// Notification is a notification passed between the Gateway servers type Notification struct { - Target map[string]string `json:"target"` - SendSynchronicity bool `json:"sendSynchronicity"` - Notification interface{} `json:"notification"` + // Target for the notification + // + // Describes attributes of the target that should receive the notification + // + // Required: true + // Example: { "cluster": "minikube", "customerGUID": "b5b28ef9-d297-4a93-aec4-22de5b21e802", "component": "websocket" } + Target map[string]string `json:"target"` + // Whether to send the message synchronously + // + // If `true`, waits for the message to be sent, else the message is sent asynchronously. + // Example: true + // Default: false + SendSynchronicity bool `json:"sendSynchronicity"` + // Body of the notification + // + // Example: { "commands": [ { "CommandName": "kubescapeScan", "args": { "scanV1": { "submit": true, "excludeNamespaces": ["kube-system"] } } } ] } + Notification interface{} `json:"notification"` } From 70715fe07f5f3df4bd03ee36b7059e575385ff79 Mon Sep 17 00:00:00 2001 From: Vlad Klokun Date: Wed, 10 Aug 2022 17:02:30 +0300 Subject: [PATCH 2/2] ci: skip CI if commit changes only Markdown files --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index abaae1e..28766c0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,6 +2,8 @@ name: Release-Tag on: push: branches: [ master ] + paths-ignore: + - '**.md' jobs: build: runs-on: ubuntu-latest @@ -28,4 +30,4 @@ jobs: tag_name: v0.0.${{ github.run_number }} release_name: Release v0.0.${{ github.run_number }} draft: false - prerelease: false \ No newline at end of file + prerelease: false