Topictool - Batch replace, add or remove Github repository topic labels

Topictool

CLI Tool to manage topic labels on Github repositories

Installation

go get github.com/cbrgm/topictool

or

git clone [email protected]:cbrgm/topictool.git && cd topictool
go mod vendor && make

Usage

You'll need a Github Personal Access Token to use this tool. Create one for your user (Settings -> Developer Settings -> Personal Access Token) and grant read/write access for repositories to it. In case you want to modify private repositories of an organization please authorize SSO.

export GH_ACCESS_TOKEN=<your-token>

then run the topictool.

Usage: topictool <subcommand> <search pattern> <topic labels...>

Replace, add or remove topic labels from multiple Github repositories

Subcommands:
    - replace   - replaces all existing topic labels with new ones
    - add       - adds topic labels to existing ones
    - rm        - removes topic labels from existing ones
    
Search Pattern:
    Searches repositories via various criteria.
    See Github docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/search/#search-repositories

Topic Labels:
    A list of strings representing topic labels

Examples

Add a labels foo and bar to the repository cbrgm/topictool

topictool add "cbrgm/topictool" "foo" "bar"
Repository Name	Topics	
 ---		---	
 cbrgm/topictool	

 Add labels [foo,bar] to 1 repositories? [y/n/q]:
 
 > y
 
 Done!

Add a labels foo and bar to all repositories of user cbrgm

topictool add "user:cbrgm" "foo" "bar"
Repository Name			Topics								
 ---				---								
 cbrgm/telegram-robot-rss		bot,messenger,python,rss,rss-feed,rss-reader,telegram-bot			
 cbrgm/go-t			        cli,command-line,go,golang,twitter,twitter-api,twitter-client		
 cbrgm/clickbaiter			advertising,clickbait,generation,generator,go,golang,useless		
 cbrgm/terraform-k8s-hetzner		bash,hetzner,hetzner-cloud,kubernetes,terraform				
 cbrgm/authproxy			api,authentication,client,kubernetes,middleware,token,webhook		
 cbrgm/kubernetes-rbac-groups		authorization,cluster,kubernetes,rbac	
 
Add labels [foo,bar] to 6 repositories? [y/n/q]:

> y

Done!

Replace all labels with foo and bar for all repositories of user cbrgm already having a topic foo

topictool replace "user:cbrgm topic:foo" "foo" "bar"
Repository Name			Topics								
 ---				---								
 cbrgm/telegram-robot-rss		bot,messenger,python,rss,rss-feed,rss-reader,telegram-bot,foo			
 cbrgm/go-t			        cli,command-line,go,golang,twitter,twitter-api,twitter-client,foo		
 cbrgm/clickbaiter			advertising,clickbait,generation,generator,go,golang,useless,foo		
 cbrgm/terraform-k8s-hetzner		bash,hetzner,hetzner-cloud,kubernetes,terraform,foo				
 cbrgm/authproxy			api,authentication,client,kubernetes,middleware,token,webhook,foo		
 cbrgm/kubernetes-rbac-groups		authorization,cluster,kubernetes,rbac,foo	
 
Replace all existing topic labels with [foo,bar] in 6 repositories? [y/n/q]:

> y

Done!

Contributing & License

Feel free to submit changes! See the Contributing Guide. This project is open-source and is developed under the terms of the Apache 2.0 License.

Owner
Christian Bargmann
DevOps Engineer @moia-dev. I code things with my bare hands!
Christian Bargmann
Similar Resources

Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, as well as can convert black lists to multiple other black list formats compatible with other software.

Hosts-BL Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, a

Sep 23, 2022

Updates labels for a Github repository using a template file.

Github Labeler The purpose of this application is to sync your default labels with a repository hosted by Github. Labeler automatically merges your la

Mar 6, 2022

github-actions-merger is github actions that merges pull request with commit message including pull request labels.

github-actions-merger github-actions-merger is github actions that merges pull request with commit message including pull request labels. Usage Write

Dec 7, 2022

Fabric-Batch-Chaincode (FBC) is a library that enables batch transactions in chaincode without additional trusted systems.

Fabric-Batch-Chaincode Fabric-Batch-Chaincode (FBC) is a library that enables batch transactions in chaincode without additional trusted systems. Over

Nov 9, 2022

GoBatch is a batch processing framework in Go like Spring Batch in Java

GoBatch is a batch processing framework in Go like Spring Batch in Java

GoBatch English|中文 GoBatch is a batch processing framework in Go like Spring Batch in Java. If you are familiar with Spring Batch, you will find GoBat

Dec 25, 2022

A kubernetes plugin which enables dynamically add or remove GPU resources for a running Pod

A kubernetes plugin which enables dynamically add or remove GPU resources for a running Pod

GPU Mounter GPU Mounter is a kubernetes plugin which enables add or remove GPU resources for running Pods. This Introduction(In Chinese) is recommende

Jan 5, 2023

A Wireguard VPN Server Manager and API to add and remove clients

Wireguard Manager And API A manager and API to add, remove clients as well as other features such as an auto reapplier which deletes and adds back a c

Dec 22, 2022

Todo-list - In this project using golang and mySql to create todo-list to Add and remove

Todo-list - In this project using golang and mySql to create todo-list to Add and remove

TODO-Fullstack-App-Go-Gin-Postgres-React This fullstack application creates a TODO List Web Page using the Go/Gin/Postgres/React Stack. Starting the a

Apr 7, 2022

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

A cross-platform package manager for the web! Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions

Nov 21, 2022

CLI tool for manipulating GitHub Labels across multiple repositories

takolabel Installation Mac $ brew install tommy6073/tap/takolabel Other platforms Download from Releases page in this repository. Usage Set variables

Nov 3, 2022

A tiny wrapper around NSQ topic and channel :rocket:

Event Bus NSQ A tiny wrapper around go-nsq topic and channel. Protect nsq calls with gobreaker. Installation go get -u github.com/rafaeljesus/nsq-even

Sep 27, 2022

Store a topic messages to database table

Store messages to database table by structure hints The message type in the broker must be the json object Only use one table for store data Configura

Dec 13, 2021

Cheat - A program that fetches data from cht.sh based on the topic

cheat cheat is a program that fetches data from cht.sh from the topic that the user provided. Quick Start Clone this repo: git clone https://github.co

Jan 5, 2022

Repository belajar docker ALTA Immerseive Back-End Batch 4

Belajar Docker Repository belajar docker ALTA Immerseive Back-End Batch 4 Untuk materi ini teman-teman bisa download docker sesuai dengan OS masing-ma

Nov 12, 2021

An operator to manage node labels, annotations, and taints.

NodeConfig Operator An operator to manage node labels, annotations and taints based on NodeConfig Custom Resource. Comparison to alternatives: https:/

Dec 2, 2022

create PDF from ASCII File for Cable labels

CableLable create PDF from ASCII File for Cable labels file format is one label per line, a line containing up to 3 words, each word is a line on the

Nov 8, 2021

Tackle Add-on to discover information from a source repository

Tackle Add-ons - Discovery - Languages This add-on explores the source code repository and finds the languages using GitHub Linguist. It's common that

Dec 24, 2021

A GitHub CLI extension that displays collaboration-related information about a GitHub repository.

A GitHub CLI extension that displays collaboration-related information about a GitHub repository.

collab-scanner GitHub CLI extension A GitHub CLI extension that displays collaboration-related information on a repository. Install gh extension insta

Dec 30, 2022

A feature flag solution, with only a YAML file in the backend (S3, GitHub, HTTP, local file ...), no server to install, just add a file in a central system and refer to it. 🎛️

A feature flag solution, with only a YAML file in the backend (S3, GitHub, HTTP, local file ...), no server to install, just add a file in a central system and refer to it. 🎛️

🎛️ go-feature-flag A feature flag solution, with YAML file in the backend (S3, GitHub, HTTP, local file ...). No server to install, just add a file i

Dec 29, 2022
Comments
Queue with NATS Jetstream to remove all the erlangs from cloud

Saf in Persian means Queue. One of the problems, that we face on projects with queues is deploying RabbitMQ on the cloud which brings us many challenges for CPU load, etc. I want to see how NATS with Jetstream can work as the queue to replace RabbitMQ.

Dec 15, 2022
Build platforms that flexibly mix SQL, batch, and stream processing paradigms

Overview Gazette makes it easy to build platforms that flexibly mix SQL, batch, and millisecond-latency streaming processing paradigms. It enables tea

Dec 12, 2022
Batch messages over a time interval

timebatch timebatch is a package for batching messages over a time interval. This can be useful for receiving messages that occur "quickly" and sendin

Nov 3, 2021
Github-notifications - Small script to alert me when I have notifications on Github. I use it in my Polybar conf

Github notification polybar widget This tool is meant to be used with Polybar, in order to let the user know when they have notifications on Github. R

Jan 26, 2022
Chanify is a safe and simple notification tools. This repository is command line tools for Chanify.

Chanify is a safe and simple notification tools. For developers, system administrators, and everyone can push notifications with API.

Dec 29, 2022
⚡️ A lightweight service that will build and store your go projects binaries, Integrated with Github, Gitlab, Bitbucket and Bitbucket Server.
⚡️ A lightweight service that will build and store your go projects binaries, Integrated with Github, Gitlab, Bitbucket and  Bitbucket Server.

Rabbit A lightweight service that will build and store your go projects binaries. Rabbit is a lightweight service that will build and store your go pr

Nov 19, 2022
🚀 Golang, Go Fiber, RabbitMQ, MongoDB, Docker, Kubernetes, GitHub Actions and Digital Ocean
🚀 Golang, Go Fiber, RabbitMQ, MongoDB, Docker, Kubernetes, GitHub Actions and Digital Ocean

Bookings Solução de cadastro de usuários e reservas. Tecnologias Utilizadas Golang MongoDB RabbitMQ Github Actions Docker Hub Docker Kubernetes Digita

Feb 18, 2022
Send slack notifications using Github action

Slack notification This is a simple Slack notification action which runs using a Bot token. Example Action A simple example on how to use this action:

Aug 9, 2021
A Github action that notifies PR's that are open longer than X days

PR notifier Use GitHub Actions to notify Slack that a pull request is opened since DAYS_BEFORE days. Usage Add the following YAML to your new GitHub A

Apr 8, 2022
mqtt-rewriter is a tool that can forward data from a topic to another topic.

mqtt-rewriter Background mqtt-rewriter is a tool that can forward data from a topic to another topic. Install Todo... Usage Currently only supports tw

Feb 18, 2022