Skip to content

Commit

Permalink
attempt to limit runs when MR is open
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Mar 9, 2024
1 parent 6a04390 commit dc42c48
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
types: [opened, reopened]
schedule:
- cron: '44 21 * * 0'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Documentation
on:
push:
pull_request:
types: [opened, reopened]
pull_request_target:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: type checking
on:
push:
pull_request:
types: [opened, reopened]
pull_request_target:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Code quality
on:
push:
pull_request:
types: [opened, reopened]
pull_request_target:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Tests
on:
push:
pull_request:
types: [opened, reopened]
pull_request_target:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions ca/django_ca/key_backends/storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ class UsePrivateKeyOptions(pydantic.BaseModel):
@classmethod
def load_default_password(cls, password: Optional[bytes], info: ValidationInfo) -> Optional[bytes]:
"""Validator to load the password from CA_PASSWORDS if not given."""
if info.context is not None and password is None:
if info.context and password is None:
ca: CertificateAuthority = info.context.get("ca")
if ca:
settings_password = ca_settings.CA_PASSWORDS.get(ca.serial)
if isinstance(settings_password, str):
return settings_password.encode()
elif isinstance(settings_password, bytes):
if isinstance(settings_password, bytes):
return settings_password

return password
Expand Down

0 comments on commit dc42c48

Please sign in to comment.