Skip to content

Commit 1a3e4d5

Browse files
chore(ci): verify autorelease release PR content has changes (googleapis#226)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/4d7892ee-6265-4e89-b8a8-1c509f6b7076/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@da29da3
1 parent f1421f5 commit 1a3e4d5

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

java-spanner-jdbc/.github/workflows/auto-release.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@ jobs:
2121
return;
2222
}
2323
24+
// only approve PRs with pom.xml and versions.txt changes
25+
const filesPromise = github.pulls.listFiles.endpoint({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
pull_number: context.payload.pull_request.number,
29+
});
30+
const changed_files = await github.paginate(filesPromise)
31+
32+
if ( changed_files.length < 1 ) {
33+
console.log( "Not proceeding since PR is empty!" )
34+
return;
35+
}
36+
37+
if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) {
38+
console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" )
39+
return;
40+
}
41+
2442
// trigger auto-release when
2543
// 1) it is a SNAPSHOT release (auto-generated post regular release)
2644
// 2) there are dependency updates only

java-spanner-jdbc/synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-spanner-jdbc.git",
7-
"sha": "ecd35a542cfbcf6587adc2b9bea82724b74df576"
7+
"sha": "3583c5f7d3b5d739fd6bfe78baad5ea5236b38a0"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2"
14+
"sha": "da29da32b3a988457b49ae290112b74f14b713cc"
1515
}
1616
}
1717
],

0 commit comments

Comments
 (0)