[gitsync] Remove gitsync

We no longer mirror to github

Change-Id: I3487edfc27e816969723bc1969a5f97ea2510355
diff --git a/scripts/gitsync/README.md b/scripts/gitsync/README.md
deleted file mode 100644
index a10e258..0000000
--- a/scripts/gitsync/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Why `gitsync` is a thing
-
-Fuchsia source is mirrored to GitHub, and we use Gerrit for code reviews.
-Rather than run our own Gerrit server, we let Google do that for us.  However,
-Google's Gerrit infrastructure is designed to run on Git-on-Borg and doesn't
-have the ability to push to GitHub directly (yet; see b/10295007.)  So we
-run `gitsync` on a cron to sync between our Git-on-Borg host and GitHub.
-
-Fuchsia's Git-on-Borg host is public: https://fuchsia.googlesource.com/
-
-Fuchsia is mirrored to GitHub at https://github.com/fuchsia-mirror
-
-Git-on-Borg has some other features that are helpful to Fuchsia, like the
-ability to slam it with automated build and test bots without fear of angering
-the nice folks at GitHub.
-
-If b/10295007 is ever resolved and GoB/Gerrit can push to GitHub, we can take
-off and nuke the entire script from orbit (it's the only way to be sure.)
diff --git a/scripts/gitsync/compare-project-list.py b/scripts/gitsync/compare-project-list.py
deleted file mode 100755
index 17f409b..0000000
--- a/scripts/gitsync/compare-project-list.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2016 The Fuchsia Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import json
-import requests
-import sys
-import string
-
-def main():
-    r = requests.get('https://fuchsia-review.googlesource.com/projects/')
-    if r.status_code != 200:
-        print 'Failed to download project list: %d' % r.status_code
-        return 1
-    projects = json.loads(r.text[5:])
-    with open('list-of-repos.txt') as current_list:
-        listed_projects = map(string.strip, current_list.readlines())
-    meta_projects = ['All-Projects', 'All-Users', 'Read-Only', 'gerrit/verified-projects']
-    project_diff = set(projects.keys()) - set(meta_projects) - set(listed_projects)
-    if len(project_diff) != 0:
-        print 'The following projects are not in list-of-repos.txt:'
-        project_diff_sorted = list(project_diff)
-        project_diff_sorted.sort()
-        for p in project_diff_sorted:
-            print p
-    return 0
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/scripts/gitsync/gitsync-driver.sh b/scripts/gitsync/gitsync-driver.sh
deleted file mode 100755
index f2eed4f..0000000
--- a/scripts/gitsync/gitsync-driver.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# Copyright 2016 The Fuchsia Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Fetch the list of Fuchsia repos to sync and run a gitsync.sh for each.
-# Designed to be run unattended via cron job.
-
-SRC_HOST="https://fuchsia.googlesource.com"
-DST_HOST="https://github.com/fuchsia-mirror"
-SCRIPT_DIR="$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd)"
-LOG_DIR="$SCRIPT_DIR/log/$(date +%Y)/$(date +%m)/$(date +%d)"
-LOG_FILE="$LOG_DIR/$(date +%H%M%S).log"
-
-cd "${SCRIPT_DIR}"
-mkdir -p "${LOG_DIR}"
-
-# Everything below the next line will be logged to $LOG_FILE.
-exec 1>"${LOG_FILE}" 2>&1
-set -x
-echo "[gitsync] Start log"
-
-# Sync fnl-start to pull down the latest list of repos.
-git pull
-
-# We keep a list of repos checked in.  We could maybe use GitHub APIs instead.
-REPO_LIST=$(cat "${SCRIPT_DIR}"/list-of-repos.txt)
-for repo in ${REPO_LIST}; do
-  echo "[gitsync] Syncing ${repo}..."
-  "${SCRIPT_DIR}"/gitsync.sh "${SRC_HOST}" "${DST_HOST}" "${repo}"
-  date +%H:%M:%S
-done
-
-echo "[gitsync] Exited normally"
diff --git a/scripts/gitsync/gitsync.sh b/scripts/gitsync/gitsync.sh
deleted file mode 100755
index 242d0ea..0000000
--- a/scripts/gitsync/gitsync.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-# Copyright 2016 The Fuchsia Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Mirror one git repo to another.
-
-# Exit this script if one command fails.
-set -e
-
-# Print all commands for debug.
-set -x
-
-if [[ $# -ne 3 ]]; then
-  echo "Usage: $0 [source git host] [destination git host] [repo name]"
-  echo "Example: $0 https://fuchsia.googlesource.com https://github.com/fuchsia-mirror magenta"
-  exit 1
-fi
-
-SRC_HOST="$1"; DST_HOST="$2"; REPO_NAME="$3"
-TEMP_DIR="$(mktemp -d fuchsia-gitsync.XXX)"
-
-# Make sure we clean up our temp directory no matter what.
-TEMP_DIR_ABS="$(cd $TEMP_DIR && pwd)"
-trap "rm -rf \"${TEMP_DIR_ABS}\"" INT TERM EXIT
-
-# Replace slashes in $REPO_NAME with dashes since GitHub won't allow slashes in repo names.
-DST_REPO_NAME="${REPO_NAME//\//-}"
-
-# Pull down the source host.
-cd "${TEMP_DIR}"
-mkdir "${DST_REPO_NAME}"
-cd "${DST_REPO_NAME}"
-git init .
-git config core.bare true
-git remote add origin "${SRC_HOST}/${REPO_NAME}"
-git config remote.origin.mirror true
-# We want to fetch all remote heads and tags, but not everything.
-# In particular, we don't want to mirror refs/changes/*
-git config remote.origin.fetch '+refs/heads/*:refs/heads/*'
-git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
-
-# Add a git remote to the destination host.
-REMOTE_URL="${DST_HOST}/${DST_REPO_NAME}"
-git remote add gitsync "${REMOTE_URL}"
-git config remote.gitsync.mirror true
-git remote update
-
-# Check that the gitsync remote exists. If not attempt to create it.
-curl -s -f >/dev/null $REMOTE_URL
-
-if [ $? -ne 0 ] ; then
-  curl -f -i -n -X POST --data '{"name":"'$REPO_NAME'","has_issues":false,"team_id": 2058456}' https://api.github.com/orgs/fuchsia-mirror/repos
-fi
-
-# Push to the destination.
-git push gitsync
diff --git a/scripts/gitsync/list-of-repos.txt b/scripts/gitsync/list-of-repos.txt
deleted file mode 100644
index 5fdc0d9..0000000
--- a/scripts/gitsync/list-of-repos.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-atom-language-fidl
-build
-buildtools
-cobalt
-codesearch
-docs
-fargo
-garnet
-infra
-infra/config
-infra/infra
-infra/recipes
-jiri
-libc-tests
-lossmin
-manifest
-packages
-peridot
-scripts
-testing
-third_party/asio
-third_party/benchmark
-third_party/binutils-gdb
-third_party/blueprint
-third_party/boringssl
-third_party/bzip2
-third_party/cairo
-third_party/canonical-json-go
-third_party/c-ares
-third_party/cargo-vendor
-third_party/clang
-third_party/clang-tools-extra
-third_party/cmake
-third_party/cmocka
-third_party/compiler-rt
-third_party/crashpad
-third_party/curl
-third_party/dart-pkg
-third_party/depthcharge
-third_party/dropbear
-third_party/dtc
-third_party/edk2
-third_party/eigen
-third_party/expat
-third_party/ffmpeg
-third_party/flatbuffers
-third_party/flite
-third_party/freetype2
-third_party/fuchsia_build_status
-third_party/gcc_none_toolchains
-third_party/gdb
-third_party/gflags
-third_party/git
-third_party/git2go
-third_party/github.com/docker/docker
-third_party/github.com/go-check/check
-third_party/github.com/golang/appengine
-third_party/github.com/golang/protobuf
-third_party/github.com/google/go-cmp
-third_party/github.com/google/subcommands
-third_party/github.com/go-yaml/yaml
-third_party/github.com/jbenet/go-context
-third_party/github.com/jessevdk/go-flags
-third_party/github.com/kr/fs
-third_party/github.com/mitchellh/go-homedir
-third_party/github.com/moby/moby
-third_party/github.com/pkg/errors
-third_party/github.com/pkg/sftp
-third_party/github.com/sergi/go-diff
-third_party/github.com/src-d/go-git
-third_party/github.com/xanzy/ssh-agent
-third_party/glfw
-third_party/glog
-third_party/glslang
-third_party/go
-third_party/go-docopt
-third_party/go-humanize
-third_party/golang/crypto
-third_party/golang/glog
-third_party/golang/net
-third_party/golang/snappy
-third_party/golang.org/x/net
-third_party/golang.org/x/oauth2
-third_party/goleveldb
-third_party/google/subcommands
-third_party/googleapis
-third_party/googletest
-third_party/go-tuf
-third_party/grpc
-third_party/grpc/grpc-go
-third_party/gtest
-third_party/harfbuzz
-third_party/hostap
-third_party/iccjpeg
-third_party/icu
-third_party/iperf
-third_party/jemalloc
-third_party/jinja2
-third_party/json
-third_party/kr/fs
-third_party/leveldb
-third_party/libarchive
-third_party/libcxx
-third_party/libcxxabi
-third_party/libgit2
-third_party/libjpeg-turbo
-third_party/libpng
-third_party/libssh2
-third_party/libteken
-third_party/libunwind
-third_party/libvpx
-third_party/libxml2
-third_party/linenoise
-third_party/lld
-third_party/lldb
-third_party/llvm
-third_party/llvm-project
-third_party/lua
-third_party/lwip
-third_party/make
-third_party/mako
-third_party/markupsafe
-third_party/mdnsresponder
-third_party/mesa
-third_party/mini_chromium
-third_party/mio
-third_party/murmurhash.c
-third_party/netstack
-third_party/ninja
-third_party/openmp
-third_party/openssh-portable
-third_party/openwsman
-third_party/pixman
-third_party/pkg/errors
-third_party/pkg/sftp
-third_party/polly
-third_party/processor-trace
-third_party/protobuf
-third_party/pytoml
-third_party/pyyaml
-third_party/qcms
-third_party/qemu
-third_party/rapidjson
-third_party/re2
-third_party/roughtime
-third_party/rust
-third_party/rust-crates
-third_party/rust-mirrors/rand
-third_party/sbase
-third_party/sblim-sfcc
-third_party/sdl
-third_party/shaderc
-third_party/skia
-third_party/snappy
-third_party/speccpu2000
-third_party/speccpu2006
-third_party/spirv-headers
-third_party/spirv-tools
-third_party/sqlite
-third_party/supermanifest
-third_party/swift
-third_party/swift-clang
-third_party/swift-cmark
-third_party/swift-compiler-rt
-third_party/swift-corelibs-foundation
-third_party/swift-corelibs-libdispatch
-third_party/swift-corelibs-xctest
-third_party/swift-integration-tests
-third_party/swift-llbuild
-third_party/swift-lldb
-third_party/swift-llvm
-third_party/swift-package-manager
-third_party/swig
-third_party/tokio-core
-third_party/vboot_reference
-third_party/vim
-third_party/vulkan_loader_and_validation_layers
-third_party/vulkan-cts
-third_party/VulkanTools
-third_party/webkit
-third_party/wsmancli
-third_party/xi-editor
-third_party/xz
-third_party/yasm
-third_party/zlib
-topaz
-toyen
-vscode-language-fidl
-zedmon
-zircon