helpers icon indicating copy to clipboard operation
helpers copied to clipboard

CmTask11401_Find_a_way_to_keep_GitHub_repos_in_sync

Open heanhsok opened this issue 8 months ago • 2 comments

Task https://github.com/causify-ai/cmamp/issues/11401

  • Sync GH issues labels

heanhsok avatar Mar 25 '25 23:03 heanhsok

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!

heanhsok avatar Mar 26 '25 00:03 heanhsok

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

heanhsok avatar Mar 27 '25 15:03 heanhsok

@gpsaggese @sonniki Wondering if there's anything left to address in this PR, otherwise should we merge this?

heanhsok avatar Apr 09 '25 15:04 heanhsok

@sonniki I'll add a GSI for factoring a bit this code and adding tests.

gpsaggese avatar Apr 10 '25 00:04 gpsaggese

Merging as checkpoints

I'll file the follow-up GSI and outsourceable issue and reference the code in the master branch

heanhsok avatar Apr 14 '25 21:04 heanhsok