Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit da29da3

Browse filesBrowse files
chore(ci): verify autorelease release PR content has changes (#776)
1 parent 95dbe1b commit da29da3
Copy full SHA for da29da3

File tree

1 file changed

+18
-0
lines changed
Filter options

1 file changed

+18
-0
lines changed

‎synthtool/gcp/templates/java_library/.github/workflows/auto-release.yaml

Copy file name to clipboardExpand all lines: synthtool/gcp/templates/java_library/.github/workflows/auto-release.yaml
+18Lines 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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.