(request, organisation_pk)
| 61 | def github_auth_required(func): # type: ignore[no-untyped-def] |
| 62 | @wraps(func) |
| 63 | def wrapper(request, organisation_pk): # type: ignore[no-untyped-def] |
| 64 | if not GithubConfiguration.has_github_configuration( |
| 65 | organisation_id=organisation_pk |
| 66 | ): |
| 67 | return Response( |
| 68 | data={ |
| 69 | "detail": "This Organisation doesn't have a valid GitHub Configuration" |
| 70 | }, |
| 71 | content_type="application/json", |
| 72 | status=status.HTTP_400_BAD_REQUEST, |
| 73 | ) |
| 74 | return func(request, organisation_pk) |
| 75 | |
| 76 | return wrapper |
| 77 |
no test coverage detected
searching dependent graphs…