MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / _useAttributes

Method _useAttributes

github/GithubApp.py:189–235  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

187 return self._webhook_secret.value
188
189 def _useAttributes(self, attributes: dict[str, Any]) -> None:
190 if "client_id" in attributes: # pragma no branch
191 self._client_id = self._makeStringAttribute(attributes["client_id"])
192 if "client_secret" in attributes: # pragma no branch
193 self._client_secret = self._makeStringAttribute(attributes["client_secret"])
194 if "created_at" in attributes: # pragma no branch
195 self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
196 if "description" in attributes: # pragma no branch
197 self._description = self._makeStringAttribute(attributes["description"])
198 if "events" in attributes: # pragma no branch
199 self._events = self._makeListOfStringsAttribute(attributes["events"])
200 if "external_url" in attributes: # pragma no branch
201 self._external_url = self._makeStringAttribute(attributes["external_url"])
202 if "html_url" in attributes: # pragma no branch
203 self._html_url = self._makeStringAttribute(attributes["html_url"])
204 if "id" in attributes: # pragma no branch
205 self._id = self._makeIntAttribute(attributes["id"])
206 if "installations_count" in attributes: # pragma no branch
207 self._installations_count = self._makeIntAttribute(attributes["installations_count"])
208 if "name" in attributes: # pragma no branch
209 self._name = self._makeStringAttribute(attributes["name"])
210 if "node_id" in attributes: # pragma no branch
211 self._node_id = self._makeStringAttribute(attributes["node_id"])
212 if "owner" in attributes: # pragma no branch
213 self._owner = self._makeUnionClassAttributeFromTypeKey(
214 "type",
215 "User",
216 attributes["owner"],
217 (github.NamedUser.NamedUser, "User"),
218 (github.Organization.Organization, "Organization"),
219 (github.Enterprise.Enterprise, "Enterprise"),
220 )
221 if "pem" in attributes: # pragma no branch
222 self._pem = self._makeStringAttribute(attributes["pem"])
223 if "permissions" in attributes: # pragma no branch
224 self._permissions = self._makeDictAttribute(attributes["permissions"])
225 if "slug" in attributes: # pragma no branch
226 self._slug = self._makeStringAttribute(attributes["slug"])
227 self._url = self._makeStringAttribute(f"/apps/{attributes['slug']}")
228 if "updated_at" in attributes: # pragma no branch
229 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
230 if "url" in attributes:
231 # we give precedence to the slug attribute
232 if "slug" not in attributes:
233 self._url = self._makeStringAttribute(attributes["url"])
234 if "webhook_secret" in attributes: # pragma no branch
235 self._webhook_secret = self._makeStringAttribute(attributes["webhook_secret"])

Callers

nothing calls this directly

Tested by

no test coverage detected