{"id":21578302,"url":"https://github.com/stephanakkerman/github-label-copier","last_synced_at":"2025-03-18T07:31:40.685Z","repository":{"id":157307861,"uuid":"455630575","full_name":"StephanAkkerman/github-label-copier","owner":"StephanAkkerman","description":"Copy your issue labels from any (public) repository to another","archived":false,"fork":false,"pushed_at":"2024-04-18T16:15:38.000Z","size":18231,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T14:17:13.616Z","etag":null,"topics":["github","github-api","github-workflows","issue","issue-label","issue-labels","issues","labeling","labeling-tool","labels","python","python3","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StephanAkkerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-02-04T17:07:36.000Z","updated_at":"2024-04-18T16:18:34.000Z","dependencies_parsed_at":"2024-04-18T18:13:56.100Z","dependency_job_id":"df389b8d-3bf5-47bd-9385-8ee21bf71a37","html_url":"https://github.com/StephanAkkerman/github-label-copier","commit_stats":null,"previous_names":["stephanakkerman/github-label-copier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fgithub-label-copier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fgithub-label-copier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fgithub-label-copier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fgithub-label-copier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephanAkkerman","download_url":"https://codeload.github.com/StephanAkkerman/github-label-copier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244177648,"owners_count":20410993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-api","github-workflows","issue","issue-label","issue-labels","issues","labeling","labeling-tool","labels","python","python3","workflow"],"created_at":"2024-11-24T13:10:06.132Z","updated_at":"2025-03-18T07:31:40.661Z","avatar_url":"https://github.com/StephanAkkerman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Label Copier\n\n[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![MIT License](https://img.shields.io/github/license/StephanAkkerman/GitHub_Label_Copier.svg?color=brightgreen)](https://opensource.org/licenses/MIT)\n\nThis repository contains two simple tools to match easily match your labels with your other GitHub repositories.\n\n## GitHub Workflow\n\nThere are two options for copying over the labels from another repository. The first is to keep the labels that are already in the repository and only add the labels that are not in the repository yet. The second option is to delete all the labels in the repository and then add the labels from the other repository.\n\nFor both options, you need to give the workflow write access to the repository. You can find these settings in the repository settings under the `Actions` tab. Or fill in this URL: `https://github.com/[GITHUB-USERNAME]/[GITHUB-REPO]/settings/actions`, replace `[GITHUB-USERNAME]` with your GitHub username and `[GITHUB-REPO]` with the repository name.\n\nIn the yml file, you need to fill in the following `const sourceRepo = 'GITHUB-USER/GITHUB-REPO';`, replace `GITHUB-USER` with the username of the repository you want to copy the labels from and `GITHUB-REPO` with the repository name.\n\n### Option 1: Keep Labels\n\nThis option will keep all the labels that are already in the repository and only add the labels that are not in the repository yet. This is useful if you want to keep the labels that you have already created in the repository.\n\nYou can find the .yml file for this workflow in the following location `workflows/keep-labels.yml`. Simply copy the contents of this file to your `.github/workflows` folder in your repository.\n\n### Option 2: Delete Labels\n\nThis option will delete all the labels in the repository and then add the labels from the other repository. This is useful if you want to have the same labels in all your repositories.\n\nYou can find the .yml file for this workflow in the following location `workflows/delete-labels.yml`. Simply copy the contents of this file to your `.github/workflows` folder in your repository.\n\n## Python Script\n\n### Setup\n\nThere are 3 thing that you need to know before running this script, those things are:\n\n- Your GitHub token that allows the script to make changes to your repo ([Tutorial](https://catalyst.zoho.com/help/tutorials/githubbot/generate-access-token.html))\n- The repo that you want to copy the labels from (this can be any public repo)\n- Your repo that you want to copy the labels to\n\nIf you have Python installed then fill those 3 things in in `src/config.py` and then you are ready to run:\n\n```bash\npython src/main.py\n```\n\n### .exe File\n\nIf you do not have Python installed, do not worry, I have compiled a .exe file. The file is the interactive version of this script, if you want to look at the source code then check `src/label_copier.py`.\nHowever, if you are afraid of running .exe files, you can build it yourself using the pyinstaller module. The instructions to do so are posted below.\n\n```bash\npip install pyinstaller\npyinstaller --onefile src/label_copier.py\n```\n\nThe .exe file will be created in the following location `src/dist/label_copier.exe`.\n\n### Dependencies\n\nThere are no dependencies, the only library this script uses is the default request library for Python.\n\n### How to run\n\n- Clone the repository.\n- Get your GitHub token.\n- Run `python src/main.py` or `label_copier.exe`.\n- See results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanakkerman%2Fgithub-label-copier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephanakkerman%2Fgithub-label-copier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanakkerman%2Fgithub-label-copier/lists"}