Skip to content

Commit

Permalink
Consider neutral as final state when reporting (#2357)
Browse files Browse the repository at this point in the history
Consider neutral as final state when reporting

These can be e.g.configuration errors and we should notify about those users.
Fixes #2325
RELEASE NOTES BEGIN
We have fixed the reporting of configuration errors in GitLab.
RELEASE NOTES END

Reviewed-by: Matej Focko
  • Loading branch information
softwarefactory-project-zuul[bot] authored Feb 28, 2024
2 parents d041308 + 8a4c6bb commit 1ed0574
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions packit_service/worker/helpers/job_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,9 @@ def _report(
" For more details see our [guide](https://packit.dev/docs/guide#gitlab)."
)

final_commit_states = (
BaseCommitStatus.success,
BaseCommitStatus.failure,
BaseCommitStatus.error,
)
# We are only commenting final states to avoid multiple comments for a build
# Ignoring all other states eg. pending, running
if state not in final_commit_states:
if not StatusReporter.is_final_state(state):
return

self.status_reporter.report(
Expand Down
1 change: 1 addition & 0 deletions packit_service/worker/reporting/reporters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def is_final_state(state: BaseCommitStatus) -> bool:
BaseCommitStatus.success,
BaseCommitStatus.error,
BaseCommitStatus.failure,
BaseCommitStatus.neutral,
}

def _add_commit_comment_with_status(
Expand Down

0 comments on commit 1ed0574

Please sign in to comment.