Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
eff9c22
feat(auth): add HMAC authentication as config option (#248)
satterly Feb 27, 2021
7dbb6de
Bump version 8.3.3 -> 8.4.0
satterly Feb 27, 2021
629bad6
Add alert origin blackout support (#252)
satterly Apr 14, 2021
eda0756
feat: add option to show decoded auth token claims (#254)
satterly Apr 17, 2021
78562c7
feat: show user details (#255)
satterly Apr 17, 2021
273d862
feat: add alerts command for list alert attributes (#256)
satterly Apr 17, 2021
1c0bda6
fix: add scopes cmd and minor fixes (#257)
satterly Apr 18, 2021
fa8c43b
feat: add option to list groups to user cmd (#258)
satterly Apr 18, 2021
21d985a
feat: add option to list users to group cmd (#259)
satterly Apr 18, 2021
d6483cb
feat: add and remove users to/from groups (#260)
satterly Apr 18, 2021
d7e6333
feat: add examples for group cmd (#261)
satterly Apr 18, 2021
e47f857
fix: consistent use of ID as metavar (#262)
satterly Apr 18, 2021
2576cc1
Bump pyyaml from 5.3.1 to 5.4.1 (#243)
dependabot[bot] Apr 18, 2021
7203525
fix: improve alert note command (#263)
satterly Apr 18, 2021
18ca17c
Bump version 8.4.0 -> 8.5.0
satterly Apr 18, 2021
2ccded3
test: remove docker login
satterly Apr 20, 2021
38ace7f
Bump requests-hawk from 1.0.1 to 1.1.0 (#240)
dependabot[bot] Apr 20, 2021
d8853d9
Bump requests from 2.25.0 to 2.25.1 (#241)
dependabot[bot] Apr 20, 2021
130b94a
Bump pytz from 2020.4 to 2021.1 (#247)
dependabot[bot] Apr 20, 2021
44a9900
Bump tabulate from 0.8.7 to 0.8.9 (#264)
dependabot[bot] Apr 20, 2021
797b6a1
Bump pre-commit from 2.9.2 to 2.12.1 (#265)
dependabot[bot] Apr 20, 2021
cf0d34b
Bump mypy from 0.790 to 0.812 (#266)
dependabot[bot] Apr 20, 2021
60ee277
Bump pylint from 2.6.0 to 2.7.4 (#267)
dependabot[bot] Apr 20, 2021
1e7d917
feat: Add option to use custom value when creating API key (#270)
satterly May 8, 2021
70efe6d
refactor: assign api key directly (#271)
satterly May 8, 2021
255c670
refactor: convert formatted strings to f-strings (#272)
satterly May 9, 2021
269d517
Bump click from 7.1.2 to 8.0.1 (#276)
dependabot[bot] Sep 23, 2021
6c5c2bf
Bump requests-hawk from 1.1.0 to 1.1.1 (#278)
dependabot[bot] Sep 23, 2021
16c4d93
Bump pre-commit from 2.12.1 to 2.15.0 (#287)
dependabot[bot] Sep 23, 2021
1e40eba
Bump pylint from 2.7.4 to 2.11.1 (#288)
dependabot[bot] Sep 23, 2021
c0e65ee
Bump requests from 2.25.1 to 2.26.0 (#289)
dependabot[bot] Oct 1, 2021
1714270
feat: Add a --alert flag to alert keys to alert on expired and expiri…
lotooo Oct 18, 2021
597951e
Bump pytz from 2021.1 to 2021.3 (#290)
dependabot[bot] Nov 13, 2021
0a461ee
Add release workflow
satterly Nov 19, 2021
23f785d
Bump click from 8.0.1 to 8.0.3 (#291)
dependabot[bot] Nov 19, 2021
a572440
Bump version 8.5.0 -> 8.5.1
satterly Nov 19, 2021
421c6f7
Update release pipeline (#294)
satterly Nov 21, 2021
df2f5e2
No format
satterly Nov 21, 2021
9f5a8c4
build(docker): standardise docker build pipeline
satterly Dec 6, 2021
2a58ffd
Update github actions workflows
satterly Mar 18, 2023
47bff1c
Update supported python versions
satterly Mar 18, 2023
95219b4
Skip type checking for now
satterly Mar 18, 2023
1093cdc
Fix integration tests
satterly Mar 18, 2023
c2a0df2
build(deps): Bump all python dependencies (#347)
satterly Mar 18, 2023
89be3b0
Update copyright date
satterly Mar 18, 2023
3f76940
Bump version 8.5.1 -> 8.5.2
satterly Mar 18, 2023
273a0c7
Fix github action Release workflow
satterly Mar 18, 2023
e338c5f
Fix release workflow test install
satterly Mar 18, 2023
e2d7e13
Fix release workflow trigger
satterly Mar 18, 2023
c9ad80e
Bump pytz from 2022.7.1 to 2023.3 (#351)
dependabot[bot] Jun 24, 2023
b1a2001
Bump pylint from 2.16.2 to 2.17.4 (#357)
dependabot[bot] Jun 24, 2023
4ee2238
Bump mypy from 1.0.1 to 1.3.0 (#360)
dependabot[bot] Jun 24, 2023
b9644cb
Bump requests from 2.28.2 to 2.31.0 (#363)
dependabot[bot] Jun 24, 2023
0e4fc33
Bump pre-commit from 2.20.0 to 3.3.3 (#364)
dependabot[bot] Jun 24, 2023
08587ed
Bump github actions
satterly Apr 9, 2024
e1f3336
Bump pyyaml from 6.0 to 6.0.1 (#370)
dependabot[bot] Apr 9, 2024
1856fe9
Bump requests-hawk from 1.1.1 to 1.2.1 (#366)
dependabot[bot] Apr 9, 2024
a9e96b1
Bump pytz to latest
satterly Apr 11, 2024
484baa1
Bump click from 8.1.3 to 8.1.7 (#374)
dependabot[bot] Apr 11, 2024
c27b528
Bump mypy from 1.3.0 to 1.9.0 (#376)
dependabot[bot] Apr 11, 2024
f91f804
Bump pylint from 2.17.4 to 3.1.0 (#375)
dependabot[bot] Apr 11, 2024
b166ba7
Bump version 8.5.2 -> 8.5.3
satterly Apr 11, 2024
1ac3b78
Bump requests from 2.31.0 to 2.32.3 (#383)
dependabot[bot] Aug 25, 2024
58065eb
Bump pylint from 3.1.0 to 3.2.5 (#386)
dependabot[bot] Aug 25, 2024
d4e3706
Bump mypy from 1.9.0 to 1.10.1 (#385)
dependabot[bot] Aug 25, 2024
b5ce627
feat: add escalation rules
sbgap Oct 23, 2023
f7ceac8
fix: add / to escalate url
sbgap Oct 23, 2023
07de9f5
fix: add session for escalate
sbgap Oct 23, 2023
298a5c8
feat: add reactivate notification rules command
sbgap Mar 15, 2024
8abf2a4
feat: add firing of delayed notification rules
sbgap Jun 10, 2024
9c70e64
refactor: heartbeats only sends in new event/status
sbgap Mar 25, 2025
de9fea4
fix: remove heartbeat alerts from Production environment when adding …
sbgap May 6, 2025
7cae0d7
fix: make all heartbeat alerts use heartbeats environment and delte…
sbgap May 27, 2025
8115ee2
feat: add support for external heartbeats to have more precise times
sbgap Sep 23, 2025
1eebba9
refactor: heartbeats only sends in new event/status
sbgap Feb 12, 2025
f90002e
refactor: optimize heartbeats
sbgap Feb 12, 2025
bd9c1b2
refac: add progress bar for sending alerts
sbgap Mar 26, 2025
107583b
fix: add correct bulk alerting
sbgap Jan 29, 2026
1ec2da2
tests: update test flow
sbgap Jan 29, 2026
010e7d1
refactor: heartbeats only sends in new event/status
sbgap Feb 12, 2025
4b64b42
refactor: optimize heartbeats
sbgap Feb 12, 2025
3a7de5e
feat: update heartbeat alerts in bulks of 200 alerts per send
sbgap Mar 25, 2025
c984402
refac: remove alert from loop when found
sbgap Mar 26, 2025
82c7583
refac: add progress bar for sending alerts
sbgap Mar 26, 2025
d25853f
refac: bulk 100 alerts instead of 200
sbgap Mar 26, 2025
84c678d
fix: add correct bulk alerting
sbgap Jan 29, 2026
a037c79
test: update tests with new functionality of heartbeats
sbgap Jan 30, 2026
de699ea
style: fix style and remove duplicate code from rebase/merge
sbgap Jan 30, 2026
b6e1ff8
ci: update docker-compose to docker compose
sbgap Jan 30, 2026
dc87394
ci: add zip files to releases
sbgap Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
name: Docker Build and Push
name: Docker

on:
push:
branches: [ master, release/* ]
tags: [ '**' ]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
build:
name: Build & Push
runs-on: ubuntu-latest
env:
REPOSITORY_URL: docker.pkg.github.com
IMAGE_NAME: ${{ github.repository }}/alerta-cli
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
REPOSITORY_URL: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/alerta-cli
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Variables
id: vars
run: echo "::set-output name=SHORT_COMMIT_ID::$(git rev-parse --short HEAD)"
uses: actions/checkout@v4
- name: Build image
id: docker-build
run: >-
docker build
-t $IMAGE_NAME
-t $REPOSITORY_URL/$IMAGE_NAME:${{ steps.vars.outputs.SHORT_COMMIT_ID }}
-t $REPOSITORY_URL/$IMAGE_NAME:$(cat VERSION)
-t $REPOSITORY_URL/$IMAGE_NAME:$(git rev-parse --short HEAD)
-t $REPOSITORY_URL/$IMAGE_NAME:latest .
- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: docker login $REPOSITORY_URL --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
uses: docker/login-action@v2
with:
registry: ${{ env.REPOSITORY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Image
id: docker-push
run: docker push $REPOSITORY_URL/$IMAGE_NAME
run: docker push --all-tags $REPOSITORY_URL/$IMAGE_NAME

- uses: act10ns/slack@v1
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Release

on:
push:
tags: [ 'v*' ]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
id: install-deps
run: |
python3 -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .
- name: Pre-commit hooks
id: hooks
run: |
pre-commit run -a --show-diff-on-failure
- name: Test with pytest
id: test
run: |
pytest --cov=alertaclient tests/unit
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()

release:
name: Publish
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Build
id: build
run: |
python3 -m pip install --upgrade build
python3 -m build
zip alerta-api.zip -r dist/*
tar cvfz alerta-api.tar.gz dist/*
- name: Release
id: create-release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
files: |
./alerta-api.zip
./alerta-api.tar.gz

- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}

- name: Test Install
run: |
python3 -m pip install --upgrade alerta
python3 -m pip freeze
40 changes: 13 additions & 27 deletions .github/workflows/github-ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
name: CI Tests
name: Tests

on:
push:
branches: [ master, release/* ]
pull_request:
branches: [ master ]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
REPOSITORY_URL: docker.pkg.github.com

jobs:
test:
runs-on: ubuntu-latest
env:
REPOSITORY_URL: docker.pkg.github.com
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.10', '3.11', '3.12']

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -41,30 +40,17 @@ jobs:
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=50 --max-line-length=127 --statistics
- name: Type Check
id: types
run: |
python -m mypy alertaclient/
- name: Test with pytest
id: unit-test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/alerta
run: |
pytest --cov=alertaclient tests/unit
- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
docker login $REPOSITORY_URL --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
- name: Integration Test
id: integration-test
run: |
docker-compose -f docker-compose.ci.yaml build sut
docker-compose -f docker-compose.ci.yaml up --exit-code-from sut
docker-compose -f docker-compose.ci.yaml rm --stop --force

- uses: act10ns/slack@v1
docker compose -f docker-compose.ci.yaml build sut
docker compose -f docker-compose.ci.yaml up --exit-code-from sut
docker compose -f docker-compose.ci.yaml rm --stop --force
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
Expand Down
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.1
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.5.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -17,25 +17,25 @@ repos:
- id: debug-statements
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: flake8
- id: fix-encoding-pragma
args: ['--remove']
- id: pretty-format-json
args: ['--autofix']
- id: name-tests-test
args: ['--django']
exclude: ^tests/helpers/
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v1.27.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: ['--py3-plus']
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.4
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
hooks:
- id: isort
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
## Unreleased
## v8.5.2 (2023-03-18)

### Refactor

- convert formatted strings to f-strings (#272)

## v8.5.1 (2021-11-21)

### Feat

- Add a --alert flag to alert keys to alert on expired and expiring key (#274)
- Add option to use custom value when creating API key (#270)

### Refactor

- convert formatted strings to f-strings (#272)
- assign api key directly (#271)

## v8.5.0 (2021-04-18)

### Fix

- improve alert note command (#263)
- consistent use of ID as metavar (#262)
- add scopes cmd and minor fixes (#257)
- **build**: run tests against correct branch

### Feat

- add examples for group cmd (#261)
- add and remove users to/from groups (#260)
- add option to list users to group cmd (#259)
- add option to list groups to user cmd (#258)
- add alerts command for list alert attributes (#256)
- show user details (#255)
- add option to show decoded auth token claims (#254)
- **auth**: add HMAC authentication as config option (#248)
Loading