An open API service indexing awesome lists of open source software.

https://github.com/stephanakkerman/github-label-copier

Copy your issue labels from any (public) repository to another
https://github.com/stephanakkerman/github-label-copier

github github-api github-workflows issue issue-label issue-labels issues labeling labeling-tool labels python python3 workflow

Last synced: 22 days ago
JSON representation

Copy your issue labels from any (public) repository to another

Awesome Lists containing this project

README

          

# GitHub Label Copier 🏷️

[![Live Demo](https://img.shields.io/badge/Live%20Demo-Visit%20Tool-brightgreen?style=for-the-badge&logo=github)](https://akkerman.ai/github-label-copier/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)

Tired of manually recreating your finely-tuned GitHub labels for every new repository? The **GitHub Label Copier** is a simple, powerful web tool that lets you copy labels between repositories and organizations in seconds.

No installs, no command line, no fuss. Just a clean interface to get the job done quickly.

![Screenshot of the GitHub Label Copier tool](img/screenshot.png)

## ✨ Features

* **Zero Installation:** Runs entirely in your browser. Nothing to download or install.
* **Perfect Sync:** Copies the label name, color, and description exactly.
* **Update or Create:** Intelligently updates existing labels and creates new ones.
* **Optional Cleanup:** Choose to delete labels from the target that don't exist in the source.
* **Organization Support:** Works with organization-level labels β€” copy repo β†’ org, org β†’ repo, or org β†’ org.
* **Fast and Efficient:** Uses the official GitHub API for quick and reliable syncing.
* **Secure:** Your GitHub token is only used in your browser to make API requests and is never stored.
* **Free to Use & Host:** Deployed on GitHub Pages, making it free for everyone.

---

## πŸš€ Try It Live!

The tool is hosted on GitHub Pages and is ready to use right now:

**[https://akkerman.ai/github-label-copier/](https://akkerman.ai/github-label-copier/)**

---

## πŸ“‹ How to Use

Using the tool is a simple four-step process:

1. **Generate a GitHub Token:**
* The tool needs permission to read and write labels on your behalf. You can provide this by creating a **Personal Access Token (PAT)**.
* **[Click here to generate a new token](https://github.com/settings/tokens/new?scopes=repo&description=GitHub%20Label%20Copier)**.
* The link pre-selects the required `repo` scope. Just scroll down and click **"Generate token"**.
* **Copy the token immediately!** You won't be able to see it again.

2. **Fill in the Source and Target:**
* **Source:** The repository or organization you want to copy labels *from*.
* For a repository: `owner/repo` (e.g., `facebook/react`)
* For organization-level labels: just the org name (e.g., `my-org`)
* **Target:** The repository or organization you want to copy labels *to* (same formats as above).

3. **Choose Your Options:**
* Check the "Delete existing labels..." box if you want to make the target repository's labels an exact mirror of the source.

4. **Copy!**
* Click the "Copy Labels" button and watch the log for real-time progress.

---

## πŸ”’ A Note on Security

Your security is paramount. Here’s how your token is handled:

* Your Personal Access Token is stored **only in your browser's memory** while you have the page open.
* It is sent **directly to the GitHub API** over a secure HTTPS connection and is never sent to or stored on any other server.
* For maximum security, **we strongly recommend you delete the token** from your [GitHub tokens page](https://github.com/settings/tokens) after you are finished using the tool.

---

## πŸ› οΈ How It Works

This project is a pure static web application built with:

* **HTML:** For the structure and content.
* **CSS:** For clean, modern styling.
* **JavaScript (ES6+):** For all the logic, including `async/await` and the `fetch` API to communicate directly with the [GitHub REST API](https://docs.github.com/en/rest).

Because it's a static site, it can be hosted for free and with great performance on **GitHub Pages**.

## 🀝 Contributing

Contributions are welcome! If you have an idea for a new feature, find a bug, or want to improve the code, feel free to:

1. **Fork** the repository.
2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
4. Push to the branch (`git push origin feature/AmazingFeature`).
5. Open a **Pull Request**.

You can also open an issue with the "bug" or "enhancement" tag.

## πŸ“„ License

This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.