Skip to content

Commit 7467e90

Browse files
committed
AAP Chatbot: GH Actions fix.
Signed-off-by: romartin <roger600@gmail.com>
1 parent 7ea7b00 commit 7467e90

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.github/workflows/ui_release_aap_chatbot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
run: npm run test
3131
working-directory: ${{env.WORKING_DIRECTORY}}
3232

33+
- name: Run linter
34+
run: npm run eslint
35+
working-directory: ${{env.WORKING_DIRECTORY}}
36+
3337
- name: Versioning
3438
# Consider patch/minor/major versions later on, maybe as a workflow input.
3539
run: npm version patch

aap_chatbot/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,16 @@ CHATBOT_DEFAULT_PROVIDER=wisdom
7272
}
7373
}
7474
```
75+
76+
## Releasing and publishing
77+
78+
Run the following GH workflows, in order:
79+
80+
1.- [AAP Chatbot - Release](../.github/workflows/ui_release_aap_chatbot.yml)
81+
It validates the package by running tests, if successful, it releases a new version and commits the package information into the `main` branch.
82+
83+
2.- [AAP Chatbot - Publish](../.github/workflows/ui_publish_aap_chatbot.yml)
84+
It validates the package by running tests, if successful, it builds, assembles and publishes the new [package version into npmjs](https://www.npmjs.com/package/@ansible/ansible-ai-connect-chatbot?activeTab=versions).
85+
86+
NOTE: Split the whole process into two different workflows so it gives a bit more flexibility on how to release and when to publish.
87+
NOTE: Based on the [npmjs guideline for publishing new packages](https://docs.npmjs.com/updating-your-published-package-version-number).

aap_chatbot/src/App.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ function mockFetchEventSource() {
295295
const ok = status === 200;
296296
await init.onopen({ status, ok });
297297
if (status === 200) {
298+
// eslint-disable-next-line no-nested-ternary
298299
const streamData = agent
299300
? streamAgentNormalData
300301
: errorCase

0 commit comments

Comments
 (0)