Skip to content

Instantly share code, notes, and snippets.

View flavio's full-sized avatar

Flavio Castelli flavio

View GitHub Profile
@flavio
flavio / org-backup.rb
Last active July 23, 2025 16:36
Some quick helper scripts to save and restore the labels associated to PRs and issues of GitHub repositories
require 'octokit'
# Usage:
# ruby org-backup.rb save org_name
# ruby org-backup.rb restore org_name
# (expects token in .github_token file in current directory or HOME)
def read_token
paths = [
File.join(Dir.pwd, ".github_token"),