def issues_with_close(self, repoid):
"""
How long on average each week it takes to close an issue
:param repoid: The id of the project in the projects table. Use repoid() to get this.
:return: DataFrame with issues/day
"""
issuesSQL = s.sql.text("""
SELECT issues.id as "id",
issues.created_at as "date",
DATEDIFF(closed.created_at, issues.created_at) AS "days_to_close"
FROM issues
JOIN
(SELECT * FROM issue_events
WHERE issue_events.action = "closed") closed
ON issues.id = closed.issue_id
WHERE issues.repo_id = :repoid""")
return pd.read_sql(issuesSQL, self.db, params={"repoid": str(repoid)})
评论列表
文章目录