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)
- Host: GitHub
- URL: https://github.com/angelmadames/gru-rb
- Owner: angelmadames
- Created: 2022-01-13T02:16:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T15:33:50.000Z (10 months ago)
- Last Synced: 2025-04-03T16:35:59.660Z (10 months ago)
- Topics: github, issues, labels, ruby, script, settings
- Language: Ruby
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gru â GitHub Repository Updater Tool
[](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
```