Commit b0b484ba authored by nightpool's avatar nightpool Committed by Eugen Rochko

Add rake task for generating (#8661)

* add rake task for generating

* update

* rubocop
parent 47ea3184
This diff is collapsed.
# frozen_string_literal: true
namespace :repo do
desc 'Generate the file'
task :authors do
file ='', 'w')
file << <<~HEADER
Mastodon is available on [GitHub](
and provided thanks to the work of the following contributors:
url = ''
HttpLog.config.compact_log = true
while url.present?
response = HTTP.get(url)
contributors = Oj.load(response.body)
contributors.each do |c|
file << "* [#{c['login']}](#{c['html_url']})\n" if c['login']
file << "* [#{c['name']}](#{c['email']})\n" if c['name']
url = LinkHeader.parse(response.headers['Link']).find_link(%w(rel next))&.href
file << <<~FOOTER
This document is provided for informational purposes only. Since it is only updated once per release, the version you are looking at may be currently out of date. To see the full list of contributors, consider looking at the [git history]( instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment