Automatically add contributors to CITATION.cff
I was wondering if we should/could automatically add contributors to CITATION.cff. After a quick search, I can't find a GitHub action or similar that does this. People might like such an action for various OS projects. @andrew @RichardLitt.
That sounds like a great idea 💡
There is generally little development on the automatic creation of the CITATION.cff. Most of the parts to do this can be found here: https://github.com/citation-file-format
It’s funny you mention that, I wrote a script to generate some CITATION.cff files last week: https://github.com/ecosyste-ms/home/blob/main/lib/tasks/citation.rake
@andrew I will now start working on this issue using ruby^^. My programming skills in this language are very limited, but I found this that should make it much easier: https://github.com/citation-file-format/ruby-cff
The ruby part was easy:
require 'cff'
CFF::File.open('CITATION.cff') do |cff|
cff.version = CFF::VERSION
cff.authors << CFF::Person.new(ARGV[0], ARGV[1])
end
One thing I was thinking we could do is search for each committers ORCID via email/name via the api: https://info.orcid.org/documentation/api-tutorials/api-tutorial-searching-the-orcid-registry/
@andrew Good idea. That should not be that hard.
I'm just thinking about what such a CI job would look like in general. I think it makes sense to have a weekly scheduelded CI job that does the following:
- Do weekly:
- Compare all the contributors with the people in the CITATION.cff. If no new human contributor has been found quit here.
- Add first and last name from GitHub profile or search ORCID for author first and last name by email address.
- Create a pull request with the new CITATION.cff. Mention the new user_name in the pull request to check if the entry is valid.
It might be tricky to handle a combination of an automatically generated CITATION.cff file and one that has custom changes based on user requests, perhaps the action could simply open an issue to add the contributor, with a suggested automatically generated addition?
It might be tricky to handle a combination of an automatically generated CITATION.cff file and one that has custom changes based on user requests, perhaps the action could simply open an issue to add the contributor, with a suggested automatically generated addition?
I think it makes sense to tackle this issue with a command line tool first. We can tackle the entire automation process as soon as we have experience with the manual steps. For most projects, it should be sufficient to run the tool once a year. This would also give people more control and the option to change the automated suggestions based on their needs. Once we have good experience with this, we can integrate the command line tool into a CI.
As discussed yesterday with @andrew, this tool is a better fit for ecosyste.ms, but I happy to help maintain and test this project in the future.
Added some thoughts on the steps over here: https://github.com/ecosyste-ms/roadmap/issues/17#issuecomment-2191891840
Back online. Should we close this thread here and just keep it at the ecoyste.ms issue?