Add @jesserockz to codeowners (#1202)

Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Jesse Hills 2020-07-27 00:33:16 +12:00 committed by GitHub
parent abc83f6cb0
commit 25ad33a377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 53 additions and 8 deletions

View File

@ -11,6 +11,7 @@ esphome/*.py @esphome/core
esphome/core/* @esphome/core
# Integrations
esphome/components/ac_dimmer/* @glmnet
esphome/components/adc/* @esphome/core
esphome/components/api/* @OttoWinter
esphome/components/async_tcp/* @OttoWinter
@ -19,7 +20,9 @@ esphome/components/binary_sensor/* @esphome/core
esphome/components/captive_portal/* @OttoWinter
esphome/components/climate/* @esphome/core
esphome/components/climate_ir/* @glmnet
esphome/components/coolix/* @glmnet
esphome/components/cover/* @esphome/core
esphome/components/ct_clamp/* @jesserockz
esphome/components/debug/* @OttoWinter
esphome/components/dfplayer/* @glmnet
esphome/components/dht/* @OttoWinter
@ -42,6 +45,7 @@ esphome/components/pid/* @OttoWinter
esphome/components/pn532/* @OttoWinter
esphome/components/power_supply/* @esphome/core
esphome/components/restart/* @esphome/core
esphome/components/rf_bridge/* @jesserockz
esphome/components/rtttl/* @glmnet
esphome/components/script/* @esphome/core
esphome/components/sensor/* @esphome/core
@ -51,8 +55,15 @@ esphome/components/spi/* @esphome/core
esphome/components/substitutions/* @esphome/core
esphome/components/sun/* @OttoWinter
esphome/components/switch/* @esphome/core
esphome/components/tcl112/* @glmnet
esphome/components/time/* @OttoWinter
esphome/components/tm1637/* @glmnet
esphome/components/tuya/binary_sensor/* @jesserockz
esphome/components/tuya/climate/* @jesserockz
esphome/components/tuya/sensor/* @jesserockz
esphome/components/tuya/switch/* @jesserockz
esphome/components/uart/* @esphome/core
esphome/components/ultrasonic/* @OttoWinter
esphome/components/version/* @esphome/core
esphome/components/web_server_base/* @OttoWinter
esphome/components/whirlpool/* @glmnet

View File

@ -4,6 +4,7 @@ from esphome.components import sensor, voltage_sampler
from esphome.const import CONF_SENSOR, CONF_ID, ICON_FLASH, UNIT_AMPERE
AUTO_LOAD = ['voltage_sampler']
CODEOWNERS = ['@jesserockz']
CONF_SAMPLE_DURATION = 'sample_duration'

View File

@ -5,6 +5,7 @@ from esphome.const import CONF_ID, CONF_TRIGGER_ID, CONF_CODE, CONF_LOW, CONF_SY
from esphome.components import uart
DEPENDENCIES = ['uart']
CODEOWNERS = ['@jesserockz']
rf_bridge_ns = cg.esphome_ns.namespace('rf_bridge')
RFBridgeComponent = rf_bridge_ns.class_('RFBridgeComponent', cg.Component, uart.UARTDevice)

View File

@ -5,6 +5,7 @@ from esphome.const import CONF_ID
from .. import tuya_ns, CONF_TUYA_ID, Tuya
DEPENDENCIES = ['tuya']
CODEOWNERS = ['@jesserockz']
CONF_SENSOR_DATAPOINT = "sensor_datapoint"

View File

@ -5,6 +5,7 @@ from esphome.const import CONF_ID, CONF_SWITCH_DATAPOINT
from .. import tuya_ns, CONF_TUYA_ID, Tuya
DEPENDENCIES = ['tuya']
CODEOWNERS = ['@jesserockz']
CONF_TARGET_TEMPERATURE_DATAPOINT = "target_temperature_datapoint"
CONF_CURRENT_TEMPERATURE_DATAPOINT = "current_temperature_datapoint"

View File

@ -5,6 +5,7 @@ from esphome.const import CONF_ID
from .. import tuya_ns, CONF_TUYA_ID, Tuya
DEPENDENCIES = ['tuya']
CODEOWNERS = ['@jesserockz']
CONF_SENSOR_DATAPOINT = "sensor_datapoint"

View File

@ -5,6 +5,7 @@ from esphome.const import CONF_ID, CONF_SWITCH_DATAPOINT
from .. import tuya_ns, CONF_TUYA_ID, Tuya
DEPENDENCIES = ['tuya']
CODEOWNERS = ['@jesserockz']
TuyaSwitch = tuya_ns.class_('TuyaSwitch', switch.Switch, cg.Component)

View File

@ -2,9 +2,10 @@
from pathlib import Path
import sys
import argparse
from collections import defaultdict
from esphome.helpers import write_file_if_changed
from esphome.config import get_component
from esphome.config import get_component, get_platform
from esphome.core import CORE
parser = argparse.ArgumentParser()
@ -37,20 +38,47 @@ parts = [BASE]
# Fake some diretory so that get_component works
CORE.config_path = str(root)
for path in sorted(components_dir.iterdir()):
codeowners = defaultdict(list)
for path in components_dir.iterdir():
if not path.is_dir():
continue
if not (path / '__init__.py').is_file():
continue
name = path.name
comp = get_component(name)
if comp.codeowners:
for owner in comp.codeowners:
if not owner.startswith('@'):
print(f"Codeowner {owner} for integration {name} must start with an '@' symbol!")
sys.exit(1)
codeowners[f'esphome/components/{name}/*'].extend(comp.codeowners)
for platform_path in path.iterdir():
platform_name = platform_path.stem
platform = get_platform(platform_name, name)
if platform is None:
continue
if platform_path.is_dir():
# Sub foldered platforms get their own line
if not (platform_path / '__init__.py').is_file():
continue
codeowners[f'esphome/components/{name}/{platform_name}/*'].extend(platform.codeowners)
continue
# Non-subfoldered platforms add to codeowners at component level
if not platform_path.is_file() or platform_path.name == '__init__.py':
continue
codeowners[f'esphome/components/{name}/*'].extend(platform.codeowners)
for path, owners in sorted(codeowners.items()):
owners = sorted(set(owners))
if not owners:
continue
for owner in owners:
if not owner.startswith('@'):
print(f"Codeowner {owner} for integration {path} must start with an '@' symbol!")
sys.exit(1)
parts.append(f"{path} {' '.join(owners)}")
parts.append(f"esphome/components/{name}/* {' '.join(comp.codeowners)}")
# End newline
parts.append('')