Skip to content

Commit a7a43c7

Browse files
authored
Merge pull request #2 from Countly/ar2rsawseen/main
Fix alert schema and add more jobs
2 parents 949691c + 2e04b02 commit a7a43c7

File tree

5 files changed

+146
-237
lines changed

5 files changed

+146
-237
lines changed

.github/GITHUB_ACTIONS.md

Lines changed: 0 additions & 236 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
timezone: "UTC"
11+
open-pull-requests-limit: 10
12+
reviewers:
13+
- "Countly/engineering"
14+
labels:
15+
- "dependencies"
16+
- "automated"
17+
commit-message:
18+
prefix: "deps"
19+
prefix-development: "deps-dev"
20+
include: "scope"
21+
versioning-strategy: increase
22+
ignore:
23+
# Ignore major version updates for stability
24+
- dependency-name: "*"
25+
update-types: ["version-update:semver-major"]
26+
groups:
27+
# Group MCP SDK updates together
28+
mcp-sdk:
29+
patterns:
30+
- "@modelcontextprotocol/*"
31+
# Group dev dependencies together
32+
development-dependencies:
33+
dependency-type: "development"
34+
update-types:
35+
- "minor"
36+
- "patch"
37+
38+
# Maintain dependencies for GitHub Actions
39+
- package-ecosystem: "github-actions"
40+
directory: "/"
41+
schedule:
42+
interval: "weekly"
43+
day: "monday"
44+
time: "09:00"
45+
timezone: "UTC"
46+
open-pull-requests-limit: 5
47+
reviewers:
48+
- "Countly/engineering"
49+
labels:
50+
- "github-actions"
51+
- "dependencies"
52+
- "automated"
53+
commit-message:
54+
prefix: "ci"
55+
include: "scope"
56+
57+
# Maintain dependencies for Docker
58+
- package-ecosystem: "docker"
59+
directory: "/"
60+
schedule:
61+
interval: "weekly"
62+
day: "monday"
63+
time: "09:00"
64+
timezone: "UTC"
65+
open-pull-requests-limit: 5
66+
reviewers:
67+
- "Countly/engineering"
68+
labels:
69+
- "docker"
70+
- "dependencies"
71+
- "automated"
72+
commit-message:
73+
prefix: "docker"
74+
include: "scope"

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
schedule:
9+
- cron: '0 0 * * 1' # Run every Monday at midnight UTC
10+
workflow_dispatch:
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'javascript-typescript' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: security-extended,security-and-quality
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v3
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: "/language:${{matrix.language}}"

.github/workflows/npm-publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish to npm
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
workflow_dispatch:
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '20'
17+
registry-url: 'https://registry.npmjs.org/'
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Build
21+
run: npm run build
22+
- name: Publish to npm
23+
run: npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/tools/alerts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ export const createAlertToolDefinition = {
6666
description: 'Optional filter key. For crashes: "App Version". For events: custom segment name. For rating: "Rating". For nps: "NPS scale". Set to null if no filter'
6767
},
6868
filterValue: {
69-
type: ['string', 'array', 'null'],
69+
oneOf: [
70+
{ type: 'string' },
71+
{ type: 'array', items: { type: 'string' } },
72+
{ type: 'null' }
73+
],
7074
description: 'Optional filter value. For crashes: array of version strings (e.g. ["22:02:0"]). For rating: array of numbers 1-5. For nps: "detractor"/"passive"/"promoter". For events: string value. Set to null if no filter'
7175
},
7276
alertBy: {

0 commit comments

Comments
 (0)