Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Add CLI command to close incidents

Open johannaengland opened this issue 6 months ago • 2 comments

Scope and purpose

Fixes #1450.

Reference for parse_duration: https://docs.djangoproject.com/en/5.2/ref/utils/#django.utils.dateparse.parse_duration

One test that is lacking is one that covers parse_duration raising a ValueError, but I don't know how to trigger that, any ideas?

Contributor Checklist

  • [X] Added a changelog fragment for towncrier
  • [X] Added/amended tests for new/changed code
  • [X] Added/changed documentation
  • [X] Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • [X] The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to

johannaengland avatar May 23 '25 08:05 johannaengland

Codecov Report

:x: Patch coverage is 95.87629% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 79.26%. Comparing base (4fc7811) to head (876c8a6). :warning: Report is 52 commits behind head on master.

Files with missing lines Patch % Lines
...rc/argus/dev/management/commands/close_incident.py 95.23% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1480      +/-   ##
==========================================
+ Coverage   78.97%   79.26%   +0.29%     
==========================================
  Files         120      121       +1     
  Lines        5294     5388      +94     
==========================================
+ Hits         4181     4271      +90     
- Misses       1113     1117       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar May 23 '25 09:05 codecov-commenter