Skip to content

Commit 9fdcac3

Browse files
authored
Merge pull request #1158 from buerokratt/dev
Merging dev to test
2 parents f3e4d45 + 8a624a8 commit 9fdcac3

File tree

262 files changed

+10310
-2279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+10310
-2279
lines changed

.env.gui

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
RELEASE=PRE-ALPHA-test
22
VERSION=1
33
BUILD=5
4-
FIX=0
4+
FIX=1

.env.node

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
RELEASE=NOTIFICATION-NODE-PRE-ALPHA
22
VERSION=1
33
BUILD=3
4-
FIX=4
4+
FIX=5

.env.test

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
RELEASE=PRE-ALPHA-test
22
VERSION=2
33
BUILD=3
4-
FIX=5
5-
4+
FIX=55

.github/ISSUE_TEMPLATE/bug_report.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Bug report
3+
about: For reporting bugs
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Bug description:**
11+
12+
13+
**Expected behavior:**
14+
15+
16+
**Screenshots:**
17+
18+
19+
**Additional information:**
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: New feature or enhancement
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**AS A** *role or user type*
11+
**I WANT** *the feature or functionality desired*
12+
**SO THAT** *desired outcome or goal*
13+
14+
### Acceptance Criteria
15+
16+
- [ ] ...

.github/workflows/check-version.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Check Version
2+
3+
on:
4+
push:
5+
branches: ["test", "stage", "main"]
6+
workflow_dispatch:
7+
8+
env:
9+
BRANCH: ${{ github.head_ref || github.ref_name }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Docker Setup BuildX
21+
uses: docker/setup-buildx-action@v2
22+
23+
- name: Bump Patch Version
24+
run: npm run bump-patch
25+
if: ${{ env.BRANCH == 'test' }}
26+
27+
- name: Sync Version
28+
run: npm run sync-version
29+
if: ${{ env.BRANCH != 'test' }}
30+
31+
- name: Generate Changelog
32+
run: npm run changelog
33+
34+
- name: Push changes to repo
35+
run: |
36+
git config --global user.name ${{ secrets.ADMIN_NAME }}
37+
git config --global user.email ${{ secrets.ADMIN_EMAIL }}
38+
git add .
39+
git commit -m "docs: update version"
40+
git push
41+
42+
- name: Load environment variables
43+
run: |
44+
awk -v branch="${{ env.BRANCH }}" ' /^[0-9a-zA-Z]+$/ { current_branch = $0; } current_branch == branch && /^[A-Z_]+=/{ print $0; }' release.env >> $GITHUB_ENV
45+
46+
- name: Set repo
47+
run: |
48+
LOWER_CASE_GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')
49+
echo "DOCKER_TAG_CUSTOM=ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}:v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}" >> $GITHUB_ENV
50+
echo "$GITHUB_ENV"
51+
52+
- name: Build Docker image
53+
run: |
54+
echo "Building Docker image for branch: ${{ env.BRANCH }} major: ${{ env.MAJOR }} minor: ${{ env.MINOR }} patch: ${{ env.PATCH }}"
55+
cd GUI && docker image build --tag $DOCKER_TAG_CUSTOM --no-cache .
56+
if: ${{ env.BRANCH == 'test' }}
57+
58+
- name: Log in to GitHub container registry
59+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
60+
61+
- name: Push Docker image to GitHub Packages
62+
run: |
63+
echo "Pushing Docker image to GitHub Packages"
64+
docker push $DOCKER_TAG_CUSTOM
65+
if: ${{ env.BRANCH == 'test' }}
66+
67+
- name: Create Release
68+
uses: softprops/action-gh-release@v1
69+
if: ${{ env.BRANCH == 'main' }}
70+
with:
71+
tag_name: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
72+
generate_release_notes: true
73+
body_path: ${{ github.workspace }}/CHANGELOG.md

.github/workflows/ci-build-image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and publish GUI with nginx
33
on:
44
push:
55
branches:
6-
- dev
6+
- v2.0.2
77
paths:
88
- '.env.test'
99

.github/workflows/ci-build-notifiction-node.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and publish GUI with nginx
33
on:
44
push:
55
branches:
6-
- dev
6+
- v2.0.2
77
paths:
88
- '.env.node'
99

.github/workflows/create-release.yml

-23
This file was deleted.

.husky/commit-msg

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# !/bin/bash
2+
3+
message="$(head -1 $1)"
4+
5+
message_pattern="^(feat|fix|chore|docs|refactor|style|test)\([0-9]+\):\ .+$"
6+
7+
if ! [[ $message =~ $message_pattern ]];
8+
then
9+
echo "---"
10+
echo "Violation of commit message format!"
11+
echo "The commit message must follow the Conventional Commits standard:"
12+
echo "[type(scope): description]"
13+
echo "Example: feat(100): Implement automated pipeline for code commits"
14+
echo "Accepted types: feat, fix, chore, docs, refactor, style, test"
15+
echo "(1) feat: Added a new feature"
16+
echo "(2) fix: Fixed a bug"
17+
echo "(3) chore: Added changes that do not relate to a fix or feature and don't modify src or test files (for example updating dependencies)"
18+
echo "(4) docs: Added updates to documentation such as a the README or other markdown files"
19+
echo "(5) refactor: Refactored code that neither fixes a bug nor adds a feature"
20+
echo "(6) style: Added Changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on"
21+
echo "(7) test: Included new or corrected previous tests"
22+
echo "---"
23+
exit 1
24+
fi
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
anon_conversations:
2+
trigger: 0 15 * * * ?
3+
type: http
4+
method: GET
5+
url: http://localhost:8088/tasks/delete-conversations?isAuth=false&skipAuth=true
6+
auth_conversations:
7+
trigger: 0 15 * * * ?
8+
type: http
9+
method: GET
10+
url: http://localhost:8088/tasks/delete-conversations?isAuth=true&skipAuth=true
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[
22
{{#each data.botMessages}}
3-
{
4-
"chatId": "{{../data.chatId}}",
5-
"content": "{{{text}}}",
6-
"buttons": "[{{#each ../data.buttons}}{\"title\": \"{{{title}}}\",\"payload\": \"{{{payload}}}\"}{{#unless @last}},{{/unless}}{{/each}}]",
7-
"authorTimestamp": "{{../data.authorTimestamp}}",
8-
"authorId": "{{../data.authorId}}",
9-
"authorFirstName": "{{../data.authorFirstName}}",
10-
"authorLastName": "{{../data.authorLastName}}",
11-
"created": "{{../data.created}}"
12-
}{{#unless @last}},{{/unless}}
3+
{
4+
"chatId": "{{../data.chatId}}",
5+
"content": "{{{choose (escapeQuotes text) result}}}",
6+
"buttons": "[{{#each buttons}}{\"title\": \"{{{title}}}\",\"payload\": \"{{{payload}}}\"}{{#unless @last}},{{/unless}}{{/each}}]",
7+
"authorTimestamp": "{{../data.authorTimestamp}}",
8+
"authorId": "{{../data.authorId}}",
9+
"authorFirstName": "{{../data.authorFirstName}}",
10+
"authorLastName": "{{../data.authorLastName}}",
11+
"created": "{{../data.created}}"
12+
}{{#unless @last}},{{/unless}}
1313
{{/each}}
1414
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trigger": "{{ cronExpression }}",
3+
"type": "exec",
4+
"command": "{{{ command }}}"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#each names}}{{#if @index}}|||{{/if}}{{#if this}}{{this}}-{{lookup ../messages @index}}{{else}}User-{{lookup ../messages @index}}{{/if}}{{/each}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{{#each data.botMessages}}
3+
{
4+
"chatId": "{{../data.chatId}}",
5+
"content": "{{replaceDocs text context}}",
6+
"buttons": "[{{#each buttons}}{\"title\": \"{{{title}}}\",\"payload\": \"{{{payload}}}\"}{{#unless @last}},{{/unless}}{{/each}}]",
7+
"authorTimestamp": "{{../data.authorTimestamp}}",
8+
"authorId": "{{../data.authorId}}",
9+
"authorFirstName": "{{../data.authorFirstName}}",
10+
"authorLastName": "{{../data.authorLastName}}",
11+
"event": "{{../data.event}}",
12+
"created": "{{../data.created}}"
13+
}{{#unless @last}},{{/unless}}
14+
{{/each}}
15+
]
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{{#each chats}}
3+
"{{this.baseId}}"
4+
{{#unless @last}},{{/unless}}
5+
{{/each}}
6+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[
2+
{{#if (filterControlCharacters prompt_message)}}
3+
{
4+
"role": "system",
5+
"content": "{{filterControlCharacters prompt_message}}"
6+
}
7+
{{/if}}
8+
{{#if messages}}
9+
{{#each messages}}
10+
{{#if (filterControlCharacters content)}}
11+
{{#if (eq authorRole "end-user")}},
12+
{
13+
"role": "user",
14+
"content": "{{filterControlCharacters content}}"
15+
}
16+
{{else}},
17+
{
18+
"role": "assistant",
19+
"content": "{{filterControlCharacters content}}"
20+
}
21+
{{/if}}
22+
{{/if}}
23+
{{/each}}
24+
{{/if}}
25+
{{#if new_message}},
26+
{
27+
"role": "user",
28+
"content": "{{filterControlCharacters new_message}}"
29+
}
30+
{{/if}}
31+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"isAuthConversations": "{{lookupConfigs configurationArray 'isAuthConversations' }}",
3+
"authPeriod": "{{lookupConfigs configurationArray 'authPeriod' }}",
4+
"isAnonymConversations": "{{lookupConfigs configurationArray 'isAnonymConversations' }}",
5+
"anonymPeriod": "{{lookupConfigs configurationArray 'anonymPeriod' }}",
6+
"deletionTimeISO": "{{lookupConfigs configurationArray 'deletionTimeISO' }}"
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{{#each data}}
3+
{
4+
"channelId": "{{chatBaseId}}",
5+
"timestamp": "{{getISODate}}",
6+
"payload": {
7+
"type": "message",
8+
"messageId": "{{baseId}}"
9+
}
10+
}{{#unless @last}},{{/unless}}
11+
{{/each}}
12+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{{#each data}}
3+
{
4+
"index": {
5+
"_index": "notifications"
6+
}
7+
},
8+
{
9+
"channelId": "{{chatBaseId}}",
10+
"timestamp": "{{getISODate}}",
11+
"payload": {
12+
"type": "message",
13+
"messageId": "{{baseId}}"
14+
}
15+
}{{#unless @last}},{{/unless}}
16+
{{/each}}
17+
]

DSL/DMapper/hbs/return_organization_working_time.handlebars

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@
1818
"organizationWorkingTimeWeekdays": "{{lookupConfigs configurationArray 'organizationWorkingTimeWeekdays' }}",
1919
"organizationClosedOnWeekEnds": "{{lookupConfigs configurationArray 'organizationClosedOnWeekEnds' }}",
2020
"organizationTheSameOnAllWorkingDays": "{{lookupConfigs configurationArray 'organizationTheSameOnAllWorkingDays' }}",
21-
"organizationWorkingTimeNationalHolidays": "{{lookupConfigs configurationArray 'organizationWorkingTimeNationalHolidays' }}"
21+
"organizationWorkingTimeNationalHolidays": "{{lookupConfigs configurationArray 'organizationWorkingTimeNationalHolidays' }}",
22+
"organizationWorkingAllTime": "{{lookupConfigs configurationArray 'organizationWorkingAllTime' }}",
23+
"organizationNoCsaAskForContacts": "{{lookupConfigs configurationArray 'organizationNoCsaAskForContacts' }}",
24+
"organizationNoCsaAvailableMessage": "{{lookupConfigs configurationArray 'organizationNoCsaAvailableMessage' }}",
25+
"organizationOutsideWorkingHoursAskForContacts": "{{lookupConfigs configurationArray 'organizationOutsideWorkingHoursAskForContacts' }}",
26+
"organizationOutsideWorkingHoursMessage": "{{lookupConfigs configurationArray 'organizationOutsideWorkingHoursMessage' }}"
2227
}

DSL/DMapper/hbs/return_widget_config.handlebars

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"widgetBubbleMessageText": "{{lookupConfigs configurationArray 'widgetBubbleMessageText' }}",
55
"widgetColor": "{{lookupConfigs configurationArray 'widgetColor' }}",
66
"isWidgetActive": "{{lookupConfigs configurationArray 'isWidgetActive' }}",
7-
"widgetAnimation": "{{lookupConfigs configurationArray 'widgetAnimation' }}"
7+
"widgetAnimation": "{{lookupConfigs configurationArray 'widgetAnimation' }}",
8+
"isBurokrattActive": "{{lookupConfigs configurationArray 'is_burokratt_active' }}"
89
}

DSL/DMapper/lib/helpers.js

-37
This file was deleted.

0 commit comments

Comments
 (0)