+
Skip to content

Exclude archived repositories by default. #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ You can run `github2mr -help` to see available options, but in brief:
* Or the reverse, ignoring all personal-repositories.
* You can exclude repositories by name.
* You can default to cloning repositories via HTTP, instead of SSH.
* By default all _archived_ repositories are excluded.


## Other Git Hosts
Expand Down
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func main() {
//
// Parse flags
//
archived := flag.Bool("archived", false, "Include archived repositories in the output?")
api := flag.String("api", "https://api.github.com/", "The API end-point to use for the remote git-host.")
authHeader := flag.Bool("auth-header-token", false, "Use an authorization-header including 'token' rather than 'bearer'.\nThis is required for gitbucket, and perhaps other systems.")
exclude := flag.String("exclude", "", "Comma-separated list of repositories to exclude.")
Expand Down Expand Up @@ -360,6 +361,15 @@ func main() {
//
for _, repo := range all {

//
// If the repository is archived then
// skip it, unless we're supposed to keep
// it.
//
if *repo.Archived && !*archived {
continue
}

//
// The clone-type is configurable
//
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载