Revamp github integration (#64190)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com> Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
37caa22a36
commit
6a0c3843e5
16 changed files with 1113 additions and 246 deletions
29
homeassistant/components/github/const.py
Normal file
29
homeassistant/components/github/const.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
"""Constants for the GitHub integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from logging import Logger, getLogger
|
||||
from typing import NamedTuple
|
||||
|
||||
from aiogithubapi import GitHubIssueModel
|
||||
|
||||
LOGGER: Logger = getLogger(__package__)
|
||||
|
||||
DOMAIN = "github"
|
||||
|
||||
CLIENT_ID = "1440cafcc86e3ea5d6a2"
|
||||
|
||||
DEFAULT_REPOSITORIES = ["home-assistant/core", "esphome/esphome"]
|
||||
DEFAULT_UPDATE_INTERVAL = timedelta(seconds=300)
|
||||
|
||||
CONF_ACCESS_TOKEN = "access_token"
|
||||
CONF_REPOSITORIES = "repositories"
|
||||
|
||||
|
||||
class IssuesPulls(NamedTuple):
|
||||
"""Issues and pull requests."""
|
||||
|
||||
issues_count: int
|
||||
issue_last: GitHubIssueModel | None
|
||||
pulls_count: int
|
||||
pull_last: GitHubIssueModel | None
|
Loading…
Add table
Add a link
Reference in a new issue