Skip to content

Commit d7395df

Browse files
authored
Deprecate Orginization.edit_hook (#3404)
Use `Organization.get_hook(id).edit(…)` instead. If you need to avoid `Organization.get_hook(id)` to fetch the `Hook` object from Github API, use a lazy Github instance: Github(…, lazy=True).get_organization(…).get_hook(id).edit(…)
1 parent 78050d3 commit d7395df

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

github/Organization.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
from datetime import datetime
9393
from typing import TYPE_CHECKING, Any
9494

95+
from typing_extensions import deprecated
96+
9597
import github.CodeSecurityConfig
9698
import github.CodeSecurityConfigRepository
9799
import github.Copilot
@@ -1129,6 +1131,7 @@ def edit(
11291131
self._useAttributes(data)
11301132
self._set_complete()
11311133

1134+
@deprecated("Use Organization.get_hook(id).edit(…) instead")
11321135
def edit_hook(
11331136
self,
11341137
id: int,

0 commit comments

Comments
 (0)