Skip to content

Commit 8ddd190

Browse files
authored
chore: exclude and remove unnecessary owlbot postprocessor templates (googleapis#8492)
* chore: exclude and remove unnecessary templates * chore: apply update_owlbot_postprocessor_config.sh
1 parent cda60cf commit 8ddd190

9,678 files changed

Lines changed: 1589 additions & 311447 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# For each module:
4+
# Removes and excludes all OwlBot Post-Processor templates (https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/java_library),
5+
# except for README.md
6+
7+
set -e
8+
9+
for dir in $(find . -mindepth 2 -maxdepth 2 -name owlbot.py | sort | xargs dirname ); do
10+
pushd "$dir"
11+
12+
# form a perl command to replace java.common_templates() invocation
13+
perl_command='s/java\.common_templates\(.*\)/java.common_templates(excludes=['
14+
comma=""
15+
for exclusion in '.github/*' '.kokoro/*' '.samples/*' 'CODE_OF_CONDUCT.md' 'CONTRIBUTING.md' 'LICENSE' 'SECURITY.md' 'java.header' 'license-checks.xml' 'renovate.json'; do
16+
perl_command+="${comma}\n $(echo "\"${exclusion}\"" | sed 's/\//\\\//g')"
17+
comma=","
18+
19+
# delete files and directories
20+
if [[ ${exclusion: -2} == '/*' ]]; then
21+
rm -rf "${exclusion%??}" || true
22+
else
23+
rm "${exclusion}" || true
24+
fi
25+
done
26+
perl_command+='\n])/s'
27+
# execute the replacement in owlbot.py
28+
perl -0pe "$perl_command" 'owlbot.py' > 'owlbot.py.new' && rm 'owlbot.py' && mv 'owlbot.py.new' 'owlbot.py'
29+
30+
popd
31+
32+
done

java-accessapproval/.github/CODEOWNERS

Lines changed: 0 additions & 10 deletions
This file was deleted.

java-accessapproval/.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

java-accessapproval/.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

java-accessapproval/.github/ISSUE_TEMPLATE/support_request.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

java-accessapproval/.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

java-accessapproval/.github/auto-label.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

java-accessapproval/.github/blunderbuss.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

java-accessapproval/.github/generated-files-bot.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

java-accessapproval/.github/release-please.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)