Use GraphQL for GitHub integration (#66928)
This commit is contained in:
parent
4ca339c5b1
commit
9f57ce504b
14 changed files with 201 additions and 1144 deletions
|
@ -31,12 +31,11 @@ async def setup_github_integration(
|
|||
},
|
||||
headers=headers,
|
||||
)
|
||||
for endpoint in ("issues", "pulls", "releases", "commits"):
|
||||
aioclient_mock.get(
|
||||
f"https://api.github.com/repos/{repository}/{endpoint}",
|
||||
json=json.loads(load_fixture(f"{endpoint}.json", DOMAIN)),
|
||||
headers=headers,
|
||||
)
|
||||
aioclient_mock.post(
|
||||
"https://api.github.com/graphql",
|
||||
json=json.loads(load_fixture("graphql.json", DOMAIN)),
|
||||
headers=headers,
|
||||
)
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
|
||||
setup_result = await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue