repocribro.commands¶
repocheck¶
-
class
repocribro.commands.repocheck.
RepocheckCommand
¶ -
__dict__
= mappingproxy({'__module__': 'repocribro.commands.repocheck', 'event2webhook': {'PushEvent': 'push', 'ReleaseEvent': 'release', 'RepositoryEvent': 'repository'}, 'run': <function RepocheckCommand.run>, '_do_check': <function RepocheckCommand._do_check>, '_process_event': <function RepocheckCommand._process_event>, '__dict__': <attribute '__dict__' of 'RepocheckCommand' objects>, '__weakref__': <attribute '__weakref__' of 'RepocheckCommand' objects>, '__doc__': None})¶
-
__module__
= 'repocribro.commands.repocheck'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
_do_check
(repo)¶ Perform single repository check for new events
Parameters: repo ( repocribro.models.Repository
) – Repository to be checkedRaises: SystemExit – if GitHub API request fails Todo
handle pagination of GitHub events
-
_process_event
(repo, event)¶ Process potentially new event for repository
Parameters: - repo (
repocribro.models.Repository
) – Repository related to event - event (dict) – GitHub event data
Returns: If the event was new or already registered before
Return type: bool
- repo (
-
event2webhook
= {'PushEvent': 'push', 'ReleaseEvent': 'release', 'RepositoryEvent': 'repository'}¶
-
run
(full_name=None)¶ Run the repocheck command to check repo(s) new events
Obviously this procedure can check events only on public repositories. If name of repository is not specified, then procedure will be called on all registered public repositories in DB.
Parameters: full_name (str) – Name of repository to be checked (if None -> all) Raises: SystemExit – If repository with given full_name does not exist
-
-
repocribro.commands.repocheck.
_repocheck
(full_name=None)¶