CmTask11401_Find_a_way_to_keep_GitHub_repos_in_sync
Task https://github.com/causify-ai/cmamp/issues/11401
- Sync GH issues labels
Example usage:
❯ sync_gh_issue_labels.py \
--yaml ./labels/gh_issues_labels.yml \
--owner causify-ai \
--repo sports_analytics \
--token ******* \
--backup
00:46:21 - INFO hdbg.py init_logger:1013 Saving log to file '{'/Users/heanh/src/helpers1/dev_scripts_helpers/github/sync_gh_issue_labels.py.log'}'
00:46:21 - INFO hdbg.py init_logger:1018 > cmd='/Users/heanh/src/helpers1/dev_scripts_helpers/github/sync_gh_issue_labels.py --yaml ./labels/gh_issues_labels.yml --owner causify-ai --repo sports_analytics --token ******* --backup'
00:46:21 - INFO sync_gh_issue_labels.py _main:306 Labels backed up to /Users/heanh/src/helpers1/dev_scripts_helpers/github/labels/backup/labels.causify-ai.sports_analytics.yaml
Are you sure you want to synchronize labels? [y/n] y
00:46:23 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='P0', description='High priority - needs immediate attention', color='ff0000')
00:46:23 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='P1', description='Medium priority - address after P0 items', color='0052cc')
00:46:23 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='P2', description='Low
....
00:46:24 - INFO sync_gh_issue_labels.py create_label:127 Label created: Label(name='good second issue', description='Slightly more demanding tasks for newcomers', color='5F5187')
00:46:24 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='Outsource', description='Anybody can do it', color='919ebe')
00:46:24 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='Customer', description='Customer related activities with billable hours', color='ff9001')
00:46:24 - INFO sync_gh_issue_labels.py sync_labels:240 Label not changed: Label(name='Readings', description='Reading a book, article and getting familiar with code', color='cd9be1')
00:46:24 - INFO sync_gh_issue_labels.py _main:312 Label synchronization completed!
Do you want to file follow-ups for the shell script and the docs? Or feel free to do it in this PR, up to you.
Filed the followings as follow-ups so it's easier to review and discuss
- https://github.com/causify-ai/helpers/issues/438
- https://github.com/causify-ai/helpers/issues/439
@gpsaggese @sonniki Wondering if there's anything left to address in this PR, otherwise should we merge this?
@sonniki I'll add a GSI for factoring a bit this code and adding tests.
Merging as checkpoints
I'll file the follow-up GSI and outsourceable issue and reference the code in the master branch