I recently made a pull request to an open source repository that I frequently contribute too (one that I am a maintainer too as well), and I got a request from another maintainer to delete all credit to myself as this is an open source project.
I'm currently giving myself credit by using a comment at the top of the file:
#Created by Harsha Goli
I have seen this syntax used everywhere, so i'm confused on what the 'proper standards' are. The comment that other maintainer made exactly is:
Removed Author title, this is an opensource project, authored by the community
Ethically, how do you credit an author? Or is it just on a product-by-product basis?
Having your name in a comment is not a good way to take credit because other people can change the file later on and they should take credit as well. Let's look at how other projects give credit to authors.
Let's take Rails as an example.
Authors are credited in the commit themselves: https://github.com/rails/rails/commit/d57356bd5ad0d64ed3fb530d722f32107ea60cdf
Authors are credited in the changelog: https://github.com/rails/rails/blob/master/activejob/CHANGELOG.md
Authors are credited in the contribution page: https://github.com/rails/rails/graphs/contributors
Some other projects have a file with the list of contributors: https://github.com/RubyMoney/money-rails/blob/master/CONTRIBUTORS
Personally I think having myself as the commit author is credit enough. Changelog is good, too.