Sync EmailData from hyperkitty. (#1366)

- This work is a prerequisite for #1290 and #1289
- Create an `EmailData` model which holds email counts per
(CommitAuthor, Version).
- Add management command `sync_mailinglist_stats` to query data from the
hyperkitty database and build `EmailData` objects from it
- EmailData.count is calculated between x.x.0 release_dates
- Add button in EmailData admin to trigger task
- Update the `merge_author` method to update EmailData with the Summed
counts per version and delete EmailData which pointed to the
`CommitAuthor` being merged from.
This commit is contained in:
Brian Perrett
2024-10-21 09:39:09 -07:00
committed by GitHub
parent c0d453a58f
commit fdeb79b8e3
12 changed files with 384 additions and 2 deletions

View File

@@ -243,3 +243,20 @@ If both the `--release` and the `--library-name` are passed, the command will lo
|----------------------|--------|--------------------------------------------------------------|
| `--token` | string | Pass a GitHub API token. If not passed, will use the value in `settings.GITHUB_TOKEN`. |
| `--delete-versions` | bool | If passed, all existing beta Version records will be deleted before the new beta release is imported. |
## `sync_mailinglist_stats`
**Purpose**: Build EmailData objects from the hyperkitty email archive database.
**Example**
```bash
./manage.py sync_mailinglist_stats
```
**Options**
| Options | Format | Description |
|----------------------|--------|--------------------------------------------------------------|
| `--clean` | bool | If passed, all existing beta EmailData records will be deleted before running the sync. |