MCPcopy Create free account
hub / github.com/C3ting/ARL / commit_date

Method commit_date

app/services/githubSearch.py:52–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50
51 @property
52 def commit_date(self):
53 if self._commit_date is None:
54 commit_url = "https://api.github.com/repos/{}/commits".format(
55 self.repo_full_name)
56 params = {
57 "per_page": 1,
58 "path": self.path
59 }
60 try:
61
62 commit_info = github_client(commit_url, params=params)
63 assert commit_info
64
65 # 先保存为字符串吧
66 self._commit_date = str(parse_datetime(commit_info[0]["commit"]["author"]["date"]))
67 except Exception as e:
68 logger.info("error on {}, {}".format(commit_url, self.path))
69 logger.exception(e)
70 self._commit_date = ""
71
72 return self._commit_date
73
74 def human_content(self, keyword):
75 lines = self.content.split("\n")

Callers

nothing calls this directly

Calls 2

parse_datetimeFunction · 0.90
github_clientFunction · 0.70

Tested by

no test coverage detected