Skip to content

Commit

Permalink
Merge pull request #3151 from lkocman/acceptable_by_lawyer
Browse files Browse the repository at this point in the history
Add state acceptable_by_lawyer
  • Loading branch information
bugfinder committed Aug 30, 2024
2 parents 82f193b + ff6321b commit 9384211
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions legal-auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# SPDX-License-Identifier: MIT

# States from legaldb.suse.de / Cavil are documented in
# https://github.com/openSUSE/cavil/blob/master/docs/Architecture.md#states

import os
import os.path
import sys
Expand Down Expand Up @@ -88,7 +91,7 @@ def valid_for_opensuse(self, target_project, report):
if not indexed:
return False
datetime = parse(indexed)
# give the legaldb 2 hours to find a match (so we prefer acceptable/correct over preliminary)
# give the legaldb 2 hours to find a match (so we prefer acceptable_by_lawyer/acceptable/correct over preliminary)
if datetime.now(timezone.utc) - datetime < timedelta(hours=2):
return False
return True
Expand Down Expand Up @@ -136,7 +139,7 @@ def check_source_submission(self, src_project, src_package, src_rev, target_proj
if not self.dryrun:
REQ.patch(url, headers=self.legaldb_headers)
continue
if state not in ['acceptable', 'correct', 'unacceptable']:
if state not in ['acceptable_by_lawyer', 'acceptable', 'correct', 'unacceptable']:
return None
if state == 'unacceptable':
user = report.get('reviewing_user', None)
Expand Down

0 comments on commit 9384211

Please sign in to comment.