repo-settings - is prototype of github application which can interact with github events. This app allows keep repository configuration in .github/settings.yml with following scheme:
repository:
description: this's description for repo!
labels:
- name: bug!
color: CCC100
description: An issue with the system.
schedule: */15 * * * *
It allows to manage allowed labels description for repository. Also you can describe crontab-like schedule to specify at which time settings should be synchronized with settings file.
- Schedule - crontab-like schedule
- Label - label data located in .github/settings.yml
- RepositorySection - repository data located in .github/settings.yml
- Settings - union of Label, RepositorySection, Schedule, represents whole settings file
- LabelService - service methods related to Label business logic, like find labels for deletion
- ScheduleService - service methods related to Schedule business logic, like creating instance from string
- ScheduledTask - scheduled task which contains callable object bounded to certain task
- ScheduledTaskService - service methods related to ScheduledTaskService
There're several layers:
- domain - inner entities, which contain main business logic
- application - service layer, contains business logic and interactions with data storage
- adapters - contains adapters to external data (redis in this project)
- api and schedule_tasks - contains event handler and task implementation for scheduler.
- main - entrypoint to app, contains app builder and IoC container implementation.
There're permissions that should be grant to this app from organization
- Contents (check for changes in .github/settings.yml)
- Administration (Update repo description)
- Issues (crud for labels)
There're events on which app should be subscribed
- push (accessable via enabling
Contents
permission) - reopsitories_installation (always work by default)