mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-31 14:25:28 +00:00
github: cleanup and better document PR workflow skip logic
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
14
.github/workflows/pull_request.yml
vendored
14
.github/workflows/pull_request.yml
vendored
@@ -24,9 +24,17 @@ jobs:
|
|||||||
pull_number: context.payload.number,
|
pull_number: context.payload.number,
|
||||||
per_page: 100
|
per_page: 100
|
||||||
})
|
})
|
||||||
const shouldRun = result.data.filter(f => !f.filename.endsWith(".md") || !f.filename.endsWith(".txt") || !f.filename.startsWith("contrib/") || !f.filename.endsWith(".yml")).length > 0
|
const files = result.data.filter(file =>
|
||||||
console.log(shouldRun)
|
// We wanna run this if the PR workflow is modified
|
||||||
return shouldRun
|
(file.filename.endsWith(".yml") && !file.filename.endsWith("pull_request.yml")) ||
|
||||||
|
// Changes in Markdown files don't need tests
|
||||||
|
file.filename.endsWith(".md") ||
|
||||||
|
// Changes to fastlane metadata aren't covered by tests
|
||||||
|
file.filename.startsWith("fastlane/")
|
||||||
|
)
|
||||||
|
// If filtered file count and source file count is equal, it means all files
|
||||||
|
// in this PR are skip-worthy.
|
||||||
|
return files.length != result.data.length
|
||||||
|
|
||||||
- uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2
|
- uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2
|
||||||
if: ${{ steps.service-changed.outputs.result == 'true' }}
|
if: ${{ steps.service-changed.outputs.result == 'true' }}
|
||||||
|
Reference in New Issue
Block a user