You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-7Lines changed: 42 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@
7
7
<!-- django-4.2 | 5.0 | 5.1-#44B78B -->
8
8
<!-- labelColor=%23092E20 -->
9
9
10
-
A Django app for building GitHub Apps, providing the foundational components needed to receive webhooks and interact with GitHub's API.
10
+
A Django toolkit providing the batteries needed to build GitHub Apps - from webhook handling to API integration.
11
11
12
12
Built on [gidgethub](https://github.com/gidgethub/gidgethub) and [httpx](https://github.com/encode/httpx), django-github-app handles the boilerplate of GitHub App development. Features include webhook event routing and storage, an async-first API client with automatic authentication, and models for managing GitHub App installations, repositories, and webhook event history.
13
13
14
-
The library is async-only at the moment (following gidgethub), with sync support planned to better integrate with Django projects.
14
+
The library is async-only at the moment (following gidgethub), with sync support planned to better integrate with the majority of Django projects.
15
15
16
16
## Requirements
17
17
@@ -288,7 +288,9 @@ The GitHub App's unique identifier. Obtained when registering your GitHub App.
288
288
289
289
> **Optional** | `bool` | Default: `True`
290
290
291
-
Boolean flag to enable automatic cleanup of old webhook events.
291
+
Boolean flag to enable automatic cleanup of old webhook events. If enabled, `EventLog` instances older than [`DAYS_TO_KEEP_EVENTS`](#days_to_keep_events) (default: 7 days) are deleted during webhook processing.
292
+
293
+
Set to `False` to either retain events indefinitely or manage cleanup separately using `EventLog.objects.acleanup_events` with a task runner like [Django-Q2](https://github.com/django-q2/django-q2) or [Celery](https://github.com/celery/celery).
292
294
293
295
### `CLIENT_ID`
294
296
@@ -300,7 +302,7 @@ The GitHub App's client ID. Obtained when registering your GitHub App.
300
302
301
303
>**Optional**|`int`| Default: `7`
302
304
303
-
Number of days to retain webhook events before cleanup.
305
+
Number of days to retain webhook events before cleanup. Used by both automatic cleanup (when [`AUTO_CLEANUP_EVENTS`](#auto_cleanup_events) is `True`) and the `EventLog.objects.acleanup_events` manager method.
304
306
305
307
### `NAME`
306
308
@@ -312,10 +314,43 @@ The GitHub App's name as registered on GitHub.
312
314
313
315
> ❗ **Required** | `str`
314
316
315
-
The GitHub App's private key for authentication. Can be provided as:
317
+
The contents of the GitHub App's private key for authentication. Can be provided as:
- File contents read from disk: `Path("path/to/key.pem").read_text()`
353
+
Note that the private key should be kept secure and never committed to version control. Using environment variables or secure file storage is recommended.
0 commit comments