Preview: referencing public code in GitHub Copilot
Blog post from GitHub
In June, a feature was introduced to allow developers to block suggestions of code over 150 characters that match public code, which was helpful but limited in scope. To address more use cases, new capabilities are being launched in 2023 for Copilot, including providing developers with an inventory of similar code found in public GitHub repositories and the ability to sort this inventory by criteria like repository license and commit date. This enhancement is illustrated with a common JavaScript example, showing how developers can leverage these features to identify code fragments, understand their origins, and decide on the best implementation strategy while maintaining the flow of development. With these features, Copilot aims to responsibly innovate and enhance developer experience by offering insights into the broader community context of code suggestions.