Add invoke target for synching GH issue labels
Follow up from https://github.com/causify-ai/helpers/pull/426#discussion_r2014515674
- We have a python script that can be run to synchronize GH issue labels from a manifest file to a target repository
- The python script is designed to run on one repo at a time
- To further automate this, we want to create a shell script that would list all the repo (e.g.
gh repo list causify-ai) and then execute this python script for each of the repo
FYI @sonniki @gpsaggese
Good stuff.
- As always, let's check what's already online
- This could potentially be a second issue / project for one of the interns since it's nicely carved out from the rest. On the other side, we should always do a bit of research and sketch out the architecture to drive the interns towards something that makes sense to us @causify-ai/hiring_meister
@heanhsok
Could you explain what problem are we trying to solve with this issue?
- I wonder if it should be an
invoketask. The reason for using the invoke task is that it's easier to discover, and they are a bit more organized than many disconnected Python scripts. - Generally, it's better to add an option to process multiple repos to the script / invoke, rather than adding another script wrapping another one. We don't want to multiply the entities needlessly.
- Let's put all this in the
dev-systemGH project about GH
Could you explain what problem are we trying to solve with this issue?
We have a script that can be run to sync labels from a yml file to a specific GitHub repo. For example,
❯ sync_gh_issue_labels.py \
--yaml ./labels/gh_issues_labels.yml \
--owner causify-ai \
--repo sports_analytics \
--token ******* \
--backup
We want to be able to do that for every repo.
I wonder if it should be an invoke task.
- This would provide the solution to the problem we were discussing in https://github.com/causify-ai/helpers/pull/426#discussion_r2014486678 (which is: once the file is updated, who should do it and to which repos since not everyone can see and has the permission to all the repos)
Thus, for example, this invoke command would just update the repo that it's run on
invoke sync_gh_issue_labels
- This way, we don't need to be concerned about whether the user can see the repository or not, since we already know that those who can clone the repository can see it.
- This would also contain the side effect to the repository that this command is run on.
WDYT?
- Not sure if we need this now that we use the dockerized executable approach (https://github.com/causify-ai/helpers/issues/560) ? @gpsaggese
- If we want to get fancy, we can even run the dockerized executable using the invoke target. Maybe?
FYI @Shaunak01
All sounds good.
As part of the UI having a invoke sync_all_gh_issue_labels that iterates through all the available repos on GH under our org, might keep things simpler. The alternative of going repo-by-repo might be too clunky.
- Should this be its own bounty or GSI?
- This is going to be just a simple wrapper around the script that we have for syncing the label