MCPcopy
hub / github.com/gitcoinco/web / github_issue_state

Method github_issue_state

app/dashboard/models.py:884–899  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

882
883 @property
884 def github_issue_state(self):
885 current_github_state = self.github_issue_details.get('state') if self.github_issue_details else None
886 if not current_github_state:
887 try:
888 _org_name = org_name(self.github_url)
889 _repo_name = repo_name(self.github_url)
890 _issue_num = issue_number(self.github_url)
891 gh_issue_details = get_gh_issue_details(_org_name, _repo_name, int(_issue_num))
892 if gh_issue_details:
893 self.github_issue_details = gh_issue_details
894 self.save()
895 current_github_state = self.github_issue_details.get('state', 'open')
896 except Exception as e:
897 logger.info(e)
898 return 'open'
899 return current_github_state
900
901 @property
902 def is_issue_closed(self):

Callers

nothing calls this directly

Calls 5

saveMethod · 0.95
org_nameFunction · 0.90
repo_nameFunction · 0.90
issue_numberFunction · 0.90
get_gh_issue_detailsFunction · 0.90

Tested by

no test coverage detected