Skip to content

Commit

Permalink
chore(python): add .github/CODEOWNERS as a templated file (#252)
Browse files Browse the repository at this point in the history
* chore(python): add .github/CODEOWNERS as a templated file

Source-Link: googleapis/synthtool@c5026b3
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* lint

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Nov 12, 2021
1 parent 0d7eb01 commit c4300f3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60
digest: sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7
9 changes: 5 additions & 4 deletions packages/google-cloud-securitycenter/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.

# The @googleapis/yoshi-python is the default owner for changes in this repo
* @googleapis/yoshi-python

# @googleapis/yoshi-python is the default owner for changes in this repo
* @googleapis/yoshi-python

/samples/ @tdh911 @googleapis/python-samples-owners
# @googleapis/python-samples-owners is the default owner for samples changes
/samples/ @googleapis/python-samples-owners
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,10 @@ def create_finding(source_name):
)

request = CreateFindingRequest(
parent=source_name,
finding_id=finding_id,
finding=finding,
parent=source_name, finding_id=finding_id, finding=finding,
)
# Call The API.
created_finding = client.create_finding(
request=request
)
created_finding = client.create_finding(request=request)
print(created_finding)
# [END securitycenter_create_finding]
return created_finding
Expand Down Expand Up @@ -241,11 +237,7 @@ def create_finding_with_source_properties(source_name):
)

created_finding = client.create_finding(
request={
"parent": source_name,
"finding_id": finding_id,
"finding": finding
}
request={"parent": source_name, "finding_id": finding_id, "finding": finding}
)
print(created_finding)
# [END securitycenter_create_finding_with_source_properties]
Expand Down Expand Up @@ -283,10 +275,7 @@ def update_finding(source_name):
event_time=event_time,
)
updated_finding = client.update_finding(
request={
"finding": finding,
"update_mask": field_mask,
}
request={"finding": finding, "update_mask": field_mask}
)

print(
Expand All @@ -304,6 +293,7 @@ def update_finding_state(source_name):

from google.cloud import securitycenter
from google.cloud.securitycenter_v1 import Finding

# Create a client.
client = securitycenter.SecurityCenterClient()
# source_name is the resource path for a source that has been
Expand Down Expand Up @@ -554,11 +544,7 @@ def group_findings_at_time(source_name):
read_time = datetime.utcnow() - timedelta(days=1)

group_result_iterator = client.group_findings(
request={
"parent": source_name,
"group_by": "category",
"read_time": read_time,
}
request={"parent": source_name, "group_by": "category", "read_time": read_time}
)
for i, group_result in enumerate(group_result_iterator):
print((i + 1), group_result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ def list_assets_with_filters_and_read_time(organization_id):

# Call the API and print results.
asset_iterator = client.list_assets(
request={
"parent": org_name,
"filter": project_filter,
"read_time": read_time,
}
request={"parent": org_name, "filter": project_filter, "read_time": read_time}
)
for i, asset_result in enumerate(asset_iterator):
print(i, asset_result)
Expand Down

0 comments on commit c4300f3

Please sign in to comment.