Skip to content

Commit

Permalink
docs: add the platform detection in the flowchart
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jun 5, 2024
1 parent 3705f96 commit 88b8204
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions docs/send-notification-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ flowchart TD
subgraph "User and Repository Interaction"
webhook --> user[User]
user --> addWebhookToRepo[Add webhook to repository]
addWebhookToRepo --> repository[Repository]
addWebhookToRepo --> repository[Git Repository]
user --> ownsRepo[Owns]
ownsRepo --> repository
end
Expand All @@ -139,13 +139,27 @@ flowchart TD
triggerEvent --> sendPayload[Send event payload to bot]
sendPayload --> bot
subgraph "Event Processing"
bot --> processEvent{Process event}
processEvent --> checkAction{Is there an action?}
checkAction -->|Yes| actionMessage[Event type: Action]
checkAction -->|No| eventNameMessage[Event type: Event name]
eventNameMessage --> checkSettings{Is event allowed in settings?}
actionMessage --> checkSettings
subgraph "Bot Processing"
bot --> detectPlatform{Detect platform}
subgraph "Platform Detection"
detectPlatform -->|GitHub| setGithubPlatform[Set GitHub platform]
detectPlatform -->|GitLab| setGitlabPlatform[Set GitLab platform]
setGithubPlatform --> getGithubPlatformFile[Get GitHub platform file]
setGitlabPlatform --> getGitlabPlatformFile[Get GitLab platform file]
end
getGithubPlatformFile --> setEventConfig[Set event config]
getGitlabPlatformFile --> setEventConfig[Set event config]
setEventConfig --> processEvent{Process event}
subgraph "Event Processing"
processEvent --> checkAction{Is there an action?}
checkAction -->|Yes| actionMessage[event_type: Action of event]
checkAction -->|No| eventNameMessage[event_type: Event name]
eventNameMessage --> checkSettings{Is event_type allowed in settings?}
actionMessage --> checkSettings
end
end
checkSettings -->|Yes| findTemplate{Find message template}
Expand Down

0 comments on commit 88b8204

Please sign in to comment.