Commit 2143bf3e authored by Simon Chabot's avatar Simon Chabot
Browse files

feat: change the tag to prevent assignbot assigning a reviewer to 'no-assignbot'

BREAKING CHANGE: assignbot will ignore the 'no-assignbot' tag, and not the 'client-project'

previously the tag was 'client-project', but it was not very well chosen as some
client project may need assignbot's help, and some non-client-project may no
need it.

Let's use a proper tag for this.
parent dd22af89c942
Pipeline #22243 passed with stage
in 26 seconds
...@@ -33,7 +33,7 @@ from assignbot.s3_utils import download_file, upload_file ...@@ -33,7 +33,7 @@ from assignbot.s3_utils import download_file, upload_file
TO_REVIEW_LABEL = "To Review" TO_REVIEW_LABEL = "To Review"
REVIEW_ACCESS_LEVEL = 30 # developper REVIEW_ACCESS_LEVEL = 30 # developper
CLIENT_PROJECT_TAG = "client-project" DO_NOT_REVIEW_TAG = "no-assignbot"
STATE_FILENAME = "auto_assigned_reviewers.csv" STATE_FILENAME = "auto_assigned_reviewers.csv"
PENDING_MR_MESSAGE = """\ PENDING_MR_MESSAGE = """\
...@@ -179,11 +179,12 @@ class ReviewAssigner: ...@@ -179,11 +179,12 @@ class ReviewAssigner:
continue continue
project = self.cnx.projects.get(merge_request.project_id) project = self.cnx.projects.get(merge_request.project_id)
if CLIENT_PROJECT_TAG in project.tag_list: if DO_NOT_REVIEW_TAG in project.tag_list:
# it's a client project. Let's assume that someone will take # has the 'no-assignbot' tag. Let's assume that someone will take
# care of this MR. # care of this MR.
print( print(
f"INFO: {merge_request.web_url} would need review, but it's a client project" f"INFO: {merge_request.web_url} would need review, but it "
"has the '{DO_NOT_REVIEW_TAG}' tag"
) )
continue continue
yield merge_request yield merge_request
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment