Skip to content

Make a gist secret by creating a new secret gist, and deleting the old one.

License

Notifications You must be signed in to change notification settings

pantryf/gist-conceal.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make a gist secret by creating a new secret gist, and deleting the old one.


$ node index.js fetch --github-token <token> --output gists.log
# Fetch all public gists and save to gists.log

$ export GITHUB_TOKEN=<token>
$ node index.js fetch -o gists.log --gist-filename-match /^output-/i
# Fetch all public gists, whose filename starts with "output-"

$ node index.js fetch -o gists.log --gist-description-match /OUTPUT\$/i
# Fetch all public gists, whose description ends with "OUTPUT"

# You can now go ahead and remove the gists you don't want to conceal in gists.log
# Then, run one of the following command to conceal the remaining gists

$ node index.js conceal --input gists.log
# Conceal all gists in gists.log, by creating a new secret gist, and deleting the old one

$ node index.js conceal --input gists.log -o status.log
# Conceal all gists in gists.log, and save status to status.log


Usage

$ script-gist-conceal [options] <command>

# Options:
#   -i, --input <file>               Input file (for conceal).
#   -o, --output <file>              Output file (for fetch/conceal).
#   --github-token <token>           GitHub token.
#   --github-throttle <milliseconds> Throttle time in milliseconds.
#   --gist-description-match <regex> Regex to match gist description.
#   --gist-filename-match <regex>    Regex to match gist filename.

# Commands:
#   fetch                            Fetch gists matching criteria.
#   conceal                          Conceal gists by creating new secret gists.

# Environment Variables:
#   $GITHUB_TOKEN                    GitHub token.
#   $GITHUB_THROTTLE                 Throttle time in milliseconds.


References




ORG DOI

About

Make a gist secret by creating a new secret gist, and deleting the old one.

Resources

License

Stars

Watchers

Forks