Skip to content

Commit

Permalink
chore!: promote WebSecurityScanner to v1 (#7405)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Jun 12, 2024
1 parent d8ede66 commit 5a328d4
Show file tree
Hide file tree
Showing 108 changed files with 260 additions and 9,838 deletions.
2 changes: 1 addition & 1 deletion .repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@
"WebSecurityScanner": {
"language": "php",
"distribution_name": "google/cloud-web-security-scanner",
"release_level": "preview",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest",
"library_type": "GAPIC_AUTO",
"api_shortname": "websecurityscanner"
Expand Down
2 changes: 1 addition & 1 deletion WebSecurityScanner/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deep-copy-regex:
- source: /google/cloud/websecurityscanner/(v1|v1beta)/.*-php/(.*)
- source: /google/cloud/websecurityscanner/(v1)/.*-php/(.*)
dest: /owl-bot-staging/WebSecurityScanner/$1/$2
api-name: WebSecurityScanner
5 changes: 2 additions & 3 deletions WebSecurityScanner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ echo 'Scan execution state: ' . ExecutionState::name($scanRun->getExecutionState

### Version

This component is considered beta. As such, it should be expected to be mostly
stable and we're working towards a release candidate. We will address issues
and requests with a higher priority.
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in
any minor or patch releases. We will address issues and requests with the highest priority.

### Next Steps

Expand Down
32 changes: 0 additions & 32 deletions WebSecurityScanner/metadata/V1Beta/CrawledUrl.php

This file was deleted.

49 changes: 0 additions & 49 deletions WebSecurityScanner/metadata/V1Beta/Finding.php

This file was deleted.

49 changes: 0 additions & 49 deletions WebSecurityScanner/metadata/V1Beta/FindingAddon.php

This file was deleted.

30 changes: 0 additions & 30 deletions WebSecurityScanner/metadata/V1Beta/FindingTypeStats.php

This file was deleted.

Binary file removed WebSecurityScanner/metadata/V1Beta/ScanConfig.php
Binary file not shown.
Binary file not shown.
Binary file removed WebSecurityScanner/metadata/V1Beta/ScanRun.php
Binary file not shown.
Binary file not shown.
Binary file not shown.
121 changes: 0 additions & 121 deletions WebSecurityScanner/metadata/V1Beta/WebSecurityScanner.php

This file was deleted.

49 changes: 15 additions & 34 deletions WebSecurityScanner/owlbot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,13 +30,7 @@
# Added so that we can pass copy_excludes in the owlbot_main() call
_tracked_paths.add(src)

php.owlbot_main(
src=src,
dest=dest,
copy_excludes=[
src / "**/[A-Z]*_*.php"
]
)
php.owlbot_main(src=src, dest=dest)

# remove class_alias code
s.replace(
Expand All @@ -47,29 +41,16 @@
+ "\n",
'')


### [START] protoc backwards compatibility fixes

# roll back to private properties.
s.replace(
"src/**/V*/**/*.php",
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
r"""Generated from protobuf field \1
*/
private $""")

# Replace "Unwrapped" with "Value" for method names.
s.replace(
"src/**/V*/**/*.php",
r"public function ([s|g]\w{3,})Unwrapped",
r"public function \1Value"
)

### [END] protoc backwards compatibility fixes

# fix relative cloud.google.com links
s.replace(
"src/**/V*/**/*.php",
r"(.{0,})\]\((/.{0,})\)",
r"\1](https://cloud.google.com\2)"
)
# format generated clients
subprocess.run([
'npm',
'exec',
'--yes',
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
'**/Client/*',
'--write',
'--parser=php',
'--single-quote',
'--print-width=120'])
Loading

0 comments on commit 5a328d4

Please sign in to comment.