Modified the code to ignore external repositories. Review: #55941.
Removed testing code.