Skip to content

Commit

Permalink
fix: include the compliance protos (#222)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 420306668

Source-Link: googleapis/googleapis@9a8910e

Source-Link: googleapis/googleapis-gen@24c9bfc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjRjOWJmYzRkNTlmNTBhNDllMjJhNjA3MGQxYzIyOWY1MjNkZWZkYyJ9

fix(deps): require grafeas 1.4.1
  • Loading branch information
gcf-owl-bot[bot] authored Jan 11, 2022
1 parent 3b56cb9 commit a3fea13
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ async def get_vulnerability_occurrences_summary(
The request object. Request to get a vulnerability
summary for some set of occurrences.
parent (:class:`str`):
The name of the project to get a vulnerability summary
for in the form of ``projects/[PROJECT_ID]``.
Required. The name of the project to get a vulnerability
summary for in the form of ``projects/[PROJECT_ID]``.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,8 @@ def get_vulnerability_occurrences_summary(
The request object. Request to get a vulnerability
summary for some set of occurrences.
parent (str):
The name of the project to get a vulnerability summary
for in the form of ``projects/[PROJECT_ID]``.
Required. The name of the project to get a vulnerability
summary for in the form of ``projects/[PROJECT_ID]``.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
import proto # type: ignore

from grafeas.grafeas_v1.types import vulnerability # type: ignore
from grafeas.grafeas_v1.types import severity # type: ignore


__protobuf__ = proto.module(
Expand All @@ -33,8 +33,8 @@ class GetVulnerabilityOccurrencesSummaryRequest(proto.Message):
Attributes:
parent (str):
The name of the project to get a vulnerability summary for
in the form of ``projects/[PROJECT_ID]``.
Required. The name of the project to get a vulnerability
summary for in the form of ``projects/[PROJECT_ID]``.
filter (str):
The filter expression.
"""
Expand All @@ -60,7 +60,7 @@ class FixableTotalByDigest(proto.Message):
Attributes:
resource_uri (str):
The affected resource.
severity (grafeas.v1.vulnerability.Severity):
severity (grafeas.v1.severity.Severity):
The severity for this count. SEVERITY_UNSPECIFIED indicates
total across all severities.
fixable_count (int):
Expand All @@ -72,7 +72,7 @@ class FixableTotalByDigest(proto.Message):
"""

resource_uri = proto.Field(proto.STRING, number=1,)
severity = proto.Field(proto.ENUM, number=2, enum=vulnerability.Severity,)
severity = proto.Field(proto.ENUM, number=2, enum=severity.Severity,)
fixable_count = proto.Field(proto.INT64, number=3,)
total_count = proto.Field(proto.INT64, number=4,)

Expand Down
62 changes: 4 additions & 58 deletions packages/google-cloud-containeranalysis/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
# Fix imported type from grafeas
s.replace(
library / "google/**/types/containeranalysis.py",
"from grafeas\.v1 import vulnerability_pb2",
"from grafeas.grafeas_v1.types import vulnerability"
"from grafeas\.v1 import severity_pb2",
"from grafeas.grafeas_v1.types import severity"
)

# Fix imported type from grafeas
s.replace(
library / "google/**/types/containeranalysis.py",
"vulnerability_pb2",
"vulnerability"
"severity_pb2",
"severity"
)

# Insert helper method to get grafeas client
Expand Down Expand Up @@ -113,58 +113,4 @@

python.py_samples(skip_readmes=True)

# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged

# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")

# Customize CONTRIBUTING.rst to replace master with main
s.replace(
"CONTRIBUTING.rst",
"fetch and merge changes from upstream into master",
"fetch and merge changes from upstream into main",
)

s.replace(
"CONTRIBUTING.rst",
"git merge upstream/master",
"git merge upstream/main",
)

s.replace(
"CONTRIBUTING.rst",
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
)

s.replace(
"CONTRIBUTING.rst",
"remote \(``master``\)",
"remote (``main``)",
)

s.replace(
"CONTRIBUTING.rst",
"blob/master/CONTRIBUTING.rst",
"blob/main/CONTRIBUTING.rst",
)

s.replace(
"CONTRIBUTING.rst",
"blob/master/noxfile.py",
"blob/main/noxfile.py",
)

s.replace(
"docs/conf.py",
"master_doc",
"root_doc",
)

s.replace(
"docs/conf.py",
"# The master toctree document.",
"# The root toctree document.",
)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
2 changes: 1 addition & 1 deletion packages/google-cloud-containeranalysis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"google-api-core[grpc] >= 1.28.0, <3.0.0dev",
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
"proto-plus >= 1.4.0",
"grafeas >=1.0.0, <2.0dev",
"grafeas >=1.4.1, <2.0dev",
]
extras = {"libcst": "libcst >= 0.2.5"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ google-api-core==1.28.0
grpc-google-iam-v1==0.12.3
proto-plus==1.4.0
libcst==0.2.5
grafeas==1.0.0
grafeas==1.4.1

0 comments on commit a3fea13

Please sign in to comment.