1+ # Copyright 2022 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+ # http://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+ # Github action job to test core java library features on
15+ # downstream client libraries before they are released.
116on :
217 pull_request :
318name : auto-release
@@ -16,13 +31,13 @@ jobs:
1631 return;
1732 }
1833
19- // only approve PRs like "chore: release <release version>"
20- if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
34+ // only approve PRs like "chore(main) : release <release version>"
35+ if ( !context.payload.pull_request.title.startsWith("chore(main) : release") ) {
2136 return;
2237 }
2338
2439 // only approve PRs with pom.xml and versions.txt changes
25- const filesPromise = github.pulls.listFiles.endpoint({
40+ const filesPromise = github.rest. pulls.listFiles.endpoint({
2641 owner: context.repo.owner,
2742 repo: context.repo.repo,
2843 pull_number: context.payload.pull_request.number,
5469 return;
5570 }
5671
57- const promise = github.pulls.list.endpoint({
72+ const promise = github.rest. pulls.list.endpoint({
5873 owner: context.repo.owner,
5974 repo: context.repo.repo,
6075 state: 'open'
7186 }
7287
7388 // approve release PR
74- await github.pulls.createReview({
89+ await github.rest. pulls.createReview({
7590 owner: context.repo.owner,
7691 repo: context.repo.repo,
7792 body: 'Rubber stamped release!',
8095 });
8196
8297 // attach kokoro:force-run and automerge labels
83- await github.issues.addLabels({
98+ await github.rest. issues.addLabels({
8499 owner: context.repo.owner,
85100 repo: context.repo.repo,
86101 issue_number: context.payload.pull_request.number,
0 commit comments