Skip to content

Toggle multiple git repository's visibility interactively from your terminal

Notifications You must be signed in to change notification settings

lloydlobo/privateer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

privateer

CLI Application for making a GitHub repository private

This is a command-line interface (CLI) application that makes a GitHub repository private using a personal access token (PAT). The app is written in Rust programming language and uses the serde and anyhow crates.

Prerequisites

  • Rust programming language should be installed.
  • A personal access token (PAT) with repo scope is required to modify the repository's privacy settings.

Usage

  1. Clone this repository:

    git clone https://github.com/username/repo-name.git
    
  2. Change directory to the project's root:

    cd repo-name
    
  3. Create a .env file and add your PAT token in the following format:

    PAT_TOKEN=<your-token-here>
    
  4. Build the project:

    cargo build --release
    
  5. Run the CLI app:

    ./target/release/make-private-repo
    
  6. Enter the GitHub username and repository name when prompted.

Enter username: lloydlobo
Enter repository: gittidy
...
  1. Choose whether to make the repository private or not by entering either true or false.
...
Make it private?: (true/false) true
✅ curl: exit status: 0

Functionality

The app will send a PATCH request to the GitHub API with the personal access token (PAT) included in the Authorization header. The request payload will contain the private field set to either true or false, depending on the user's input.

If the API call is successful, the repository will be made private.

Further Information

For more information on how to create a personal access token (PAT), visit the GitHub documentation.

For more information on how to make a repository private using the GitHub API, visit the GitHub documentation.

License

This project is licensed under the terms of the [LICENSE].

About

Toggle multiple git repository's visibility interactively from your terminal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages