I have borrowed some lines of code (suppose just 20 lines of a function) from a GitHub repository that is licensed under the MIT License. I plan to use these lines in my personal project.
Is it sufficient to add a comment in my code with the original author's name and the license (like this: //This function borrowed from [Github Repository Address] by [Author Name], licensed under MIT
) instead of adding their name directly to my project's LICENSE
file? Can we add a list in NOTICE.md
instead of LICENSE
? I have seen some people add a header with title # Attributions
in Readme.md
file for listing copyright.
Consider it is just a piece of code and I'm going to specify exactly which parts or lines or which files I borrowed. What is the best practice for identifying and attributing which parts of the code are authored by someone else?