mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-28 07:42:16 +00:00
Add data JSONField to LibraryVersion model Add fields to library list admin display Add commands to update authors and maintainers individually Exclude data JSONField from view querysets Silence some output from the library-version import management command Remove unused field from the library-version import management command Save library-versions more cleanly in the library-version import management command Remove loading maintainers from the import command, since they now have their own command Add docs for new commands Add boost_setup command to run one command to import all data Add docs on first-time data import Better exception handling, quieter flow, reduce GH API calls Graceful handling if there is not a github repo Pass most recent 12 months to commit counts command Add some user-friendly output to setup command
22 lines
712 B
Python
22 lines
712 B
Python
import djclick as click
|
|
|
|
from libraries.github import LibraryUpdater
|
|
|
|
|
|
@click.command()
|
|
@click.option("--local", is_flag=True, default=False)
|
|
@click.option("--token", is_flag=False, help="Github API token")
|
|
def command(local, token):
|
|
"""
|
|
Calls the LibraryUpdater, which retrieves the active boost libraries
|
|
from the Boost repo and updates the models in our database with the latest
|
|
information on that library (repo) from GitHub.
|
|
"""
|
|
click.secho(
|
|
"Updating libraries -- expect to wait 1-2 minutes before seeing output",
|
|
fg="green",
|
|
)
|
|
updater = LibraryUpdater(token=token)
|
|
updater.update_libraries()
|
|
click.secho("Finished importing libraries.", fg="green")
|