Skip to content

Commit f8e62ec

Browse files
chingor13gcf-owl-bot[bot]Neenu1995
authored
chore: migrate to owlbot (#1458)
* chore: migrate to owlbot * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Neenu1995 <[email protected]>
1 parent 08180a7 commit f8e62ec

File tree

15 files changed

+102
-109
lines changed

15 files changed

+102
-109
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docker:
2+
digest: sha256:db1616f2f70823d8381d859835229e04371d14f59ac78063c5af73c55c3fffbb
3+
image: gcr.io/repo-automation-bots/owlbot-java:latest
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 Google LLC
1+
# Copyright 2021 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,14 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""This script is used to synthesize generated parts of this library."""
1514

16-
import synthtool.languages.java as java
17-
18-
java.common_templates(excludes=[
19-
"README.md",
20-
"java.header",
21-
"checkstyle.xml",
22-
"license-checks.xml",
23-
".github/workflows/samples.yaml",
24-
])
15+
docker:
16+
image: "gcr.io/repo-automation-bots/owlbot-java:latest"

.github/blunderbuss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration for the Blunderbuss GitHub app. For more info see
2-
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss
2+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
33
assign_prs_by:
44
- labels:
55
- samples

.github/workflows/ci.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
on:
22
push:
33
branches:
4-
- main
4+
- master
55
pull_request:
66
name: ci
77
jobs:
88
units:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
java: [8, 11, 17]
12+
java: [8, 11]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: stCarolas/setup-maven@v4
1616
with:
1717
maven-version: 3.8.1
18-
- uses: actions/setup-java@v2
18+
- uses: actions/setup-java@v1
1919
with:
20-
distribution: zulu
2120
java-version: ${{matrix.java}}
2221
- run: java -version
2322
- run: .kokoro/build.sh
@@ -30,9 +29,8 @@ jobs:
3029
- uses: stCarolas/setup-maven@v4
3130
with:
3231
maven-version: 3.8.1
33-
- uses: actions/setup-java@v2
32+
- uses: actions/setup-java@v1
3433
with:
35-
distribution: zulu
3634
java-version: 8
3735
- run: java -version
3836
- run: .kokoro/build.bat
@@ -42,15 +40,14 @@ jobs:
4240
runs-on: ubuntu-latest
4341
strategy:
4442
matrix:
45-
java: [8, 11, 17]
43+
java: [8, 11]
4644
steps:
4745
- uses: actions/checkout@v2
4846
- uses: stCarolas/setup-maven@v4
4947
with:
5048
maven-version: 3.8.1
51-
- uses: actions/setup-java@v2
49+
- uses: actions/setup-java@v1
5250
with:
53-
distribution: zulu
5451
java-version: ${{matrix.java}}
5552
- run: java -version
5653
- run: .kokoro/dependencies.sh
@@ -61,9 +58,8 @@ jobs:
6158
- uses: stCarolas/setup-maven@v4
6259
with:
6360
maven-version: 3.8.1
64-
- uses: actions/setup-java@v2
61+
- uses: actions/setup-java@v1
6562
with:
66-
distribution: zulu
6763
java-version: 8
6864
- run: java -version
6965
- run: .kokoro/build.sh
@@ -76,9 +72,8 @@ jobs:
7672
- uses: stCarolas/setup-maven@v4
7773
with:
7874
maven-version: 3.8.1
79-
- uses: actions/setup-java@v2
75+
- uses: actions/setup-java@v1
8076
with:
81-
distribution: zulu
8277
java-version: 8
8378
- run: java -version
8479
- run: .kokoro/build.sh

.kokoro/dependencies.sh

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,7 @@ source ${scriptDir}/common.sh
2828
java -version
2929
echo $JOB_TYPE
3030

31-
function determineMavenOpts() {
32-
local javaVersion=$(
33-
# filter down to the version line, then pull out the version between quotes,
34-
# then trim the version number down to its minimal number (removing any
35-
# update or suffix number).
36-
java -version 2>&1 | grep "version" \
37-
| sed -E 's/^.*"(.*?)".*$/\1/g' \
38-
| sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
39-
)
40-
41-
case $javaVersion in
42-
"17")
43-
# MaxPermSize is no longer supported as of jdk 17
44-
echo -n "-Xmx1024m"
45-
;;
46-
*)
47-
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
48-
;;
49-
esac
50-
}
51-
52-
export MAVEN_OPTS=$(determineMavenOpts)
31+
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
5332

5433
# this should run maven enforcer
5534
retry_with_backoff 3 10 \

google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import com.google.api.client.json.JsonFactory;
1717
import com.google.api.client.test.json.AbstractJsonFactoryTest;
18-
1918
import java.util.ArrayList;
2019

2120
/**
@@ -24,16 +23,31 @@
2423
* @author Yaniv Inbar
2524
*/
2625
public class AndroidJsonFactoryTest extends AbstractJsonFactoryTest {
27-
26+
2827
private static final String GSON_LINE_SEPARATOR = "\n";
2928

3029
private static final String JSON_ENTRY_PRETTY =
3130
"{" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" + GSON_LINE_SEPARATOR + "}";
32-
private static final String JSON_FEED_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"entries\": ["
33-
+ GSON_LINE_SEPARATOR + " {" + GSON_LINE_SEPARATOR + " \"title\": \"foo\""
34-
+ GSON_LINE_SEPARATOR + " }," + GSON_LINE_SEPARATOR + " {"
35-
+ GSON_LINE_SEPARATOR + " \"title\": \"bar\"" + GSON_LINE_SEPARATOR + " }"
36-
+ GSON_LINE_SEPARATOR + " ]" + GSON_LINE_SEPARATOR + "}";
31+
private static final String JSON_FEED_PRETTY =
32+
"{"
33+
+ GSON_LINE_SEPARATOR
34+
+ " \"entries\": ["
35+
+ GSON_LINE_SEPARATOR
36+
+ " {"
37+
+ GSON_LINE_SEPARATOR
38+
+ " \"title\": \"foo\""
39+
+ GSON_LINE_SEPARATOR
40+
+ " },"
41+
+ GSON_LINE_SEPARATOR
42+
+ " {"
43+
+ GSON_LINE_SEPARATOR
44+
+ " \"title\": \"bar\""
45+
+ GSON_LINE_SEPARATOR
46+
+ " }"
47+
+ GSON_LINE_SEPARATOR
48+
+ " ]"
49+
+ GSON_LINE_SEPARATOR
50+
+ "}";
3751

3852
public AndroidJsonFactoryTest(String name) {
3953
super(name);
@@ -61,5 +75,4 @@ public final void testToPrettyString_Feed() throws Exception {
6175
feed.entries.add(entryBar);
6276
assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed));
6377
}
64-
6578
}

google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ public FakeTest(String name) {
2626
super(name);
2727
}
2828

29-
public final void test() throws Exception {
30-
}
29+
public final void test() throws Exception {}
3130
}

google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717
*
1818
* @author Yaniv Inbar
1919
*/
20-
2120
package com.google.api.client.extensions.android.json;
22-

google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
@Beta
2121
public class BetaClass {
2222

23-
public void method() {
24-
}
23+
public void method() {}
2524

2625
@Beta
2726
public void betaMethod() {
@@ -36,8 +35,7 @@ public BetaClass() {
3635

3736
int field;
3837

39-
@Beta
40-
int betaField;
38+
@Beta int betaField;
4139

4240
@Override
4341
public String toString() {

google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
/** A class which contains {@link Beta} fields. */
2020
public class ClassWithBetaField {
2121

22-
@Beta
23-
public int betaField;
22+
@Beta public int betaField;
2423
public int field;
2524

26-
@Beta
27-
public static final int betaStaticField = 10;
25+
@Beta public static final int betaStaticField = 10;
2826
public static final int staticField = 20;
2927

3028
public ClassWithBetaField() {

google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
/** A class which contains {@link Beta} methods. */
2020
public class ClassWithBetaMethod {
2121

22-
@Beta
23-
int betaField = 10;
22+
@Beta int betaField = 10;
2423

2524
@Beta
2625
public void betaMethod() {

owlbot.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import synthtool as s
16+
from synthtool.languages import java
17+
18+
19+
for library in s.get_staging_dirs():
20+
# put any special-case replacements here
21+
s.move(library)
22+
23+
s.remove_staging_dirs()
24+
java.common_templates(
25+
excludes=[
26+
"README.md",
27+
"java.header",
28+
"checkstyle.xml",
29+
"license-checks.xml",
30+
".github/workflows/samples.yaml",
31+
]
32+
)

renovate.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,8 @@
7070
}
7171
],
7272
"semanticCommits": true,
73-
"dependencyDashboard": true
73+
"dependencyDashboard": true,
74+
"dependencyDashboardLabels": [
75+
"type: process"
76+
]
7477
}

0 commit comments

Comments
 (0)