zhongkairen / airtable-sync

A Python module to sync GitHub issues to Airtable records.
https://airtable.com/appM1P3VYxuftmwub/tblFxnqURZZEiTMkc
0 stars 0 forks source link

Use different sandbox to test sync #10

Closed zhongkairen closed 3 weeks ago

zhongkairen commented 3 weeks ago

Task list

zhongkairen commented 3 weeks ago

https://airtable.com/app5c1A4u4zw1UbXN/tblma0DImG8wj84Va/viwS9ERBqHQVNRvsx?blocks=hide

base ID app5c1A4u4zw1UbXN

table ID tblma0DImG8wj84Va

view ID viwS9ERBqHQVNRvsx

zhongkairen commented 3 weeks ago

GitHub token GH_REPO_PAT gh.repo.project.pat

TODO scope

repo:status
read:project
zhongkairen commented 3 weeks ago

Airtable token AIRTABLE_SYNC_SANDBOX_PAT airtable.records_wr.schema_base_r.sync_sandbox.pat

zhongkairen commented 3 weeks ago

todo fix field type conversion

    todo - generalize type conversion based on field type in table schema
    """

    def iso_date_parser(x): return datetime.strptime(x, "%Y-%m-%d")
    def iso_date_formatter(x): return x.strftime("%Y-%m-%d")
    """Parser used with values in response are handled"""
    _field_parser = {
        "Start Date": iso_date_parser,
        "Delivery Date": iso_date_parser,
        "Engineering Start Date": iso_date_parser,
        "Engineering Delivery Date": iso_date_parser,
    }
    """Formatter used when passing values to request"""
    _field_formatter = {
        "Start Date": iso_date_formatter,
        "Delivery Date": iso_date_formatter,
        "Engineering Start Date": iso_date_formatter,
        "Engineering Delivery Date": iso_date_formatter,
    }