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

https://github.com/angelmadames/gru-rb

gru - A Ruby-based CLI tool to run maintenance tasks on GitHub repositories (tags, repo settings, tags rotation, stable branch cleanup, etc)
https://github.com/angelmadames/gru-rb

github issues labels ruby script settings

Last synced: 10 months ago
JSON representation

gru - A Ruby-based CLI tool to run maintenance tasks on GitHub repositories (tags, repo settings, tags rotation, stable branch cleanup, etc)

Awesome Lists containing this project

README

          

# gru ― GitHub Repository Updater Tool

[![tests](https://github.com/angelmadames/github-repo-updater/actions/workflows/rubocop.yml/badge.svg)](https://github.com/angelmadames/github-repo-updater/actions/workflows/rubocop.yml)

- [📒 Summary](#-summary)
- [âš™ī¸ Setup](#ī¸-setup)
- [🚀 Run it](#-run-it)
- [â„šī¸ Help](#â„šī¸-help)
- [âžĄī¸ Update labels](#ī¸-update-labels)
- [âžĄī¸ Update repo settings](#ī¸-update-repo-settings)
- [âžĄī¸ Remove old tags](#ī¸-remove-old-tags)

## 📒 Summary

I got tired of manually updating default settings, adding labels, and rotating
old tags on each repository. GitHub, specifically, allows you to set default
settings at the organization level for new repositories but it is not possible
to apply those to previously created repositories automatically.

The purpose of this script is to set a default set of labels
to an specified repository.

> Made with Ruby :gem: for learning purposes.

## âš™ī¸ Setup

- Create a GitHub [access token](https://github.com/settings/tokens).
- Create the dotenv (`.env`) file using the example `.env.example`
file and update it accordingly.
- Change your settings in the `config.yml` file.
- Install the script dependencies using `bundle`:

```shell
bundle install
```

## 🚀 Run it

Run the script on your terminal:

### â„šī¸ Help

```shell
./gru.rb help # Show all available commands
./gru.rb help labels # Show help for a command
```

### âžĄī¸ Update labels

```shell
./gru.rb labels add
./gru.rb labels remove
```

### âžĄī¸ Update repo settings

```shell
./gru.rb repo update
./gru.rb repo update-all
```

### âžĄī¸ Remove old tags

```shell
./gru.rb tags list
./gru.rb tags remove-stale
```