summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-10-02 13:12:14 +0000
committerGitHub <noreply@github.com>2020-10-02 13:12:14 +0000
commit9dc56214b9e24b3cba341988bd547e8ba9f7c624 (patch)
tree889fb59a18027d84e3ccc30d3b7f1dbabc15420a
parentcf03c554785ee822be3408edcfb81fa4cf03d0e5 (diff)
github: switch PR workflow from an allowlist to a blocklist
This is going to be less work to maintain going forward since we won't need to change it every time we include a new subproject. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--.github/workflows/pull_request.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 1ef3b013..ec128f18 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -21,9 +21,9 @@ jobs:
pull_number: context.payload.number,
per_page: 100
})
- const serviceChanged = result.data.filter(f => f.filename.startsWith("app/") || f.filename.startsWith("buildSrc/") || f.filename.endsWith("gradle") || f.filename.startsWith(".github/workflows/pull_request.yml") || f.filename.startsWith("gradle") || f.filename.endsWith("properties")).length > 0
- console.log(serviceChanged)
- return serviceChanged
+ const shouldRun = result.data.filter(f => !f.filename.endsWith(".md") || !f.filename.endsWith(".txt") || !f.filename.startsWith("contrib/") || !f.filename.endsWith(".yml")).length > 0
+ console.log(shouldRun)
+ return shouldRun
- name: Checkout repository
if: ${{ steps.service-changed.outputs.result == 'true' }}