Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider neutral as final state when reporting #2357

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading