Skip to content

Commit

Permalink
docs: fixed documentation and added some
Browse files Browse the repository at this point in the history
  • Loading branch information
Neal-C committed Oct 26, 2024
1 parent ddb6ca3 commit 35105d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ gh ghpm --help
gh ghpm thanos_snap
```

## Only turn 1 repository private

The github cli already supports turning 1 repository private: https://cli.github.com/manual/gh_repo_edit

```bash
gh repo edit myusername/myrepository --visibility private
```

## Roadmap

- [x] switch every repositories to private (excluding repos with >= 1 stars)
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ var (
)

var rootCmd = &cobra.Command{
Use: "ghpm",
Use: "gh ghpm",
Short: "ghpm is tool to manage privacy on github.",
Args: cobra.ExactArgs(0),
Long: `ghpm is tool to manage privacy on github. And quickly switch all repository to private.`,
Long: `ghpm is tool to manage privacy on github. And quickly switch all repositories to private.`,
RunE: func(cmd *cobra.Command, args []string) error {

if version {
Expand Down
9 changes: 3 additions & 6 deletions internal/cli/thanos_snap.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,16 @@ func Prettyfy(data any) (string, error) {
}

var thanosSnapCmd = &cobra.Command{
Use: "thanos_snap",
Use: "gh ghpm thanos_snap",
Short: "Switch all your public repositories to private.",
Args: cobra.NoArgs,
Long: heredoc.Docf(`
Switch all your public repositories to private.
By default, starred repositories with 4 starts are not turned private.
Starts interactive setup and does a HTTP request against all your public repositories to turn them private
By default, starred repositories with 1 stars are not turned private.
`, "`"),
Example: heredoc.Doc(`
# Starts interactive setup
and request all your public repositories to turn private
# request all your public repositories to turn private, except if they have stars
$ ghpm thanos_snap
`),
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/spf13/cobra"
)

var Version = "v0.1.3"
var Version = "v0.1.4"

var versionCmd = &cobra.Command{
Use: "version",
Use: "gh ghpm version",
Short: "Shows the version number of ghpm, then exits.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("'%s' (linux/amd64, linux/x86_64, linux/arm64, darwin/arm64, darwin/amd64)\n", Version)
Expand Down

0 comments on commit 35105d3

Please sign in to comment.