MCPcopy Create free account
hub / github.com/ceph/ceph / get_update_payload

Method get_update_payload

src/script/redmine-upkeep.py:323–341  ·  view source on GitHub ↗
(self, suppress_mail=True)

Source from the content-addressed store, hash-verified

321 return False
322
323 def get_update_payload(self, suppress_mail=True): # Added suppress_mail parameter
324 today = datetime.now(timezone.utc).isoformat(timespec='seconds')
325 self.add_or_update_custom_field(REDMINE_CUSTOM_FIELD_ID_UPKEEP_TIMESTAMP, today)
326
327 current_tags_str = self.get_custom_field(REDMINE_CUSTOM_FIELD_ID_TAGS)
328 current_tags = []
329 if current_tags_str:
330 current_tags = [tag.strip() for tag in current_tags_str.split(',') if tag.strip()]
331 if "upkeep-failed" in current_tags:
332 self.logger.info(f"'upkeep-failed' tag found in '{current_tags_str}'. Removing for update.")
333 current_tags.remove("upkeep-failed")
334 self.add_or_update_custom_field(REDMINE_CUSTOM_FIELD_ID_TAGS, ", ".join(current_tags))
335
336 payload = {
337 'issue': self.update_payload,
338 }
339 if suppress_mail:
340 payload['suppress_mail'] = "1"
341 return payload
342
343 def get_pr_id(self):
344 self.logger.debug("Attempting to fetch PR data.")

Callers 2

Calls 7

get_custom_fieldMethod · 0.95
nowMethod · 0.45
splitMethod · 0.45
infoMethod · 0.45
removeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected