Skip to content

Commit b9559dc

Browse files
tweak model documentation
1 parent c75a12c commit b9559dc

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,16 @@ All models and their managers provide async methods for database operations and
207207
208208
#### `EventLog`
209209
210-
`django_github_app.models.EventLog` maintains a history of incoming webhook events, storing both the event type and its full payload. Automatically cleans up old events based on your configuration, via the `acleanup_events` manager method and the `GITHUB_APP["DAYS_TO_KEEP_EVENTS"]` setting.
210+
`django_github_app.models.EventLog` maintains a history of incoming webhook events, storing both the event type and its full payload.
211211
212-
Manager methods:
212+
It also has support for automatically cleaning up old events based on your configuration, via the `acleanup_events` manager method and the `GITHUB_APP["DAYS_TO_KEEP_EVENTS"]` setting. For more details, see the sections on [`AUTO_CLEANUP_EVENTS`](#auto_cleanup_events) and [`DAYS_TO_KEEP_EVENTS`](#days_to_keep_events) in the [Configuration](#configuration) documentation below.
213+
214+
##### Manager methods
213215
214216
- `acreate_from_event`/`create_from_event`: Store incoming webhook events _(primarily for internal use)_
215217
- `acleanup_events`/`cleanup_events`: Remove events older than specified days
216218
217-
Properties:
219+
##### Properties
218220
219221
- `action`: Extract action from event payload, if present
220222
@@ -234,12 +236,12 @@ async with AsyncGitHubAPI(installation_id=installation.installation_id) as gh:
234236
await gh.post("/repos/owner/repo/issues", data={"title": "Hello!"})
235237
```
236238
237-
Manager methods:
239+
##### Manager methods
238240
239241
- `acreate_from_event`/`create_from_event`: Create from installation events _(primarily for internal use)_
240242
- `aget_from_event`/`get_from_event`: Retrieve installation from webhook events (`gidgethub.sansio.Event`)
241243
242-
Methods:
244+
##### Model methods
243245
244246
- `aget_access_token`/`get_access_token`: Generate GitHub access token for API calls
245247
@@ -255,16 +257,16 @@ repo = await Repository.objects.aget(full_name="owner/repo")
255257
issues = await repo.aget_issues(params={"state": "open"})
256258
```
257259
258-
Manager methods:
260+
##### Manager methods
259261
260262
- `aget_from_event`/`get_from_event`: Retrieve repository from webhook events (`gidgethub.sansio.Event`)
261263
262-
Methods:
264+
##### Model methods
263265
264266
- `get_gh_client`: Get configured API client for this repository
265267
- `aget_issues`/`get_issues`: Fetch repository's issues
266268
267-
Properties:
269+
##### Properties
268270
269271
- `owner`: Repository owner from full name
270272
- `repo`: Repository name from full name

0 commit comments

Comments
 (0)